Skip to content

Instantly share code, notes, and snippets.

@ironpythonbot
Created December 9, 2014 17:53
Show Gist options
  • Save ironpythonbot/ffa7d8aa48cde940fc84 to your computer and use it in GitHub Desktop.
Save ironpythonbot/ffa7d8aa48cde940fc84 to your computer and use it in GitHub Desktop.
CodePlex Issue #30502 Plain Text Attachments
from __future__ import print_function
def raiser():
print('raising an exception')
raise Exception() # unreported exception here
if __name__ == '__main__':
try:
raiser()
except Exception: # but is handled here
print('caught it')
#raiser() # ignoring exceptions would leave this unreported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment