Guest User

Untitled

a guest
Jul 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. # USER defined exceptions
  2. class user_excep(Exception):
  3.  def __init__(self, arg):
  4.  self.arg = arg
  5. try:
  6.  raise user_excep('user error')
  7. except user_excep as e:
  8.  print('User defined exception',e.arg)
Add Comment
Please, Sign In to add comment