fork download
  1. try:
  2. print(10 * (1/0))
  3. except (ZeroDivisionError) as error: # 'as' is needed by Python 3
  4. print("Yep, error caught:", error)
Success #stdin #stdout 0.08s 10840KB
stdin
Standard input is empty
stdout
('Yep, error caught:', ZeroDivisionError('integer division or modulo by zero',))