Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. class SomeException(Exception):
  2. def __init__(self, *args, **kwargs):
  3. Exception.__init__(self, *args, **kwargs)
  4.  
  5. import program_utils
  6.  
  7. def SomeFunction(arg):
  8. if arg in set([ok_val1, ok_val2]):
  9. # do something
  10. else:
  11. raise SomeException('reason')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement