import loggingdef foo(s): return 10/int(s) def bar(s): return foo(s)*2 def main(): try: bar('0') except Exception as e: logging.exception(e)main()print('END')# your code goes here# your code goes here# your code goes here
Standard input is empty
END
ERROR:root:division by zero Traceback (most recent call last): File "./prog.py", line 10, in main File "./prog.py", line 6, in bar File "./prog.py", line 3, in foo ZeroDivisionError: division by zero
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!