fork(1) download
  1. import sys
  2.  
  3. def process(thing):
  4. if thing[1] == 0:
  5. raise ValueError('thing[1] {} is zero'.format(thing))
  6.  
  7. arguments = [(1, 0), (2, 3), (3, 0)]
  8.  
  9. error = None
  10. for arg in arguments:
  11. try:
  12. process(arg)
  13. except ValueError, err:
  14. if not error:
  15. error = sys.exc_info()
  16. if error:
  17. raise error[0], error[1], error[2]
Runtime error #stdin #stdout #stderr 0.01s 9016KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 12, in <module>
  File "prog.py", line 5, in process
ValueError: thing[1] (1, 0) is zero