fork download
  1. try:
  2. a=int(input())
  3. b=int(input())
  4. print (a+b)
  5. c=hi
  6. except ValueError as e:
  7. print("value error ",e)
  8. except TypeError as e:
  9. print ("type error",e)
  10. except NameError as e:
  11. print ("Name error",e)
  12. finally :
  13. print ("done ")
Success #stdin #stdout 0.02s 7200KB
stdin
3
9
stdout
12
('Name error', NameError("name 'hi' is not defined",))
done