Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SomeException(Exception):
- def __init__(self, *args, **kwargs):
- Exception.__init__(self, *args, **kwargs)
- import program_utils
- def SomeFunction(arg):
- if arg in set([ok_val1, ok_val2]):
- # do something
- else:
- raise SomeException('reason')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement