Skip to content

Instantly share code, notes, and snippets.

@tingletech
Created May 16, 2017 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tingletech/d6e304921408b0a4ab40afd6047a6c7f to your computer and use it in GitHub Desktop.
Save tingletech/d6e304921408b0a4ab40afd6047a6c7f to your computer and use it in GitHub Desktop.
class MyException(Exception):
pass
class MyException2(Exception):
pass
def f1():
raise MyException('helllo')
try:
f1()
except MyException as e:
raise MyException2('howdy', e)
Traceback (most recent call last):
File "et.py", line 17, in <module>
raise MyException2('howdy', e)
__main__.MyException2: ('howdy', MyException('helllo',))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment