fork(18) download
  1. import logging
  2.  
  3. class MyException(Exception):
  4. def __str__(self):
  5. return 'str() was called'
  6.  
  7. try:
  8. raise MyException()
  9. except Exception as e:
  10. logging.exception(e)
  11.  
Success #stdin #stdout #stderr 0.01s 9384KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR:root:str() was called
Traceback (most recent call last):
  File "prog.py", line 8, in <module>
MyException: str() was called