Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get exception message

try:
  # do something
  pass
except:
  # this will print the message "An exception occurred and the traceback" 
  # you can't have to explicitly give the message
  logger.exception("An exception occurred")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #exception #message
ADD COMMENT
Topic
Name
1+8 =