What is the best way to get exceptions\' messages from components of standard library in Python?
I noticed that in some cases you can get it via message
message
I had the same problem. I think the best solution is to use log.exception, which will automatically print out stack trace and error message, such as:
try: pass log.info('Success') except: log.exception('Failed')