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