fork(1) download
  1. try:
  2. raise Exception("Some error")
  3. except 1:
  4. print("oops")
Runtime error #stdin #stdout #stderr 0.05s 9568KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 2, in <module>
    raise Exception("Some error")
Exception: Some error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "prog.py", line 3, in <module>
    except 1:
TypeError: catching classes that do not inherit from BaseException is not allowed