Skip to content

Instantly share code, notes, and snippets.

@OliverUv
Created August 30, 2012 19:39
Show Gist options
  • Save OliverUv/3538896 to your computer and use it in GitHub Desktop.
Save OliverUv/3538896 to your computer and use it in GitHub Desktop.
exception_message_on_failure = ''
try:
exception_message_on_failure = 'Could not access database.'
neurons = database.query(Neurons, state='Firing')
exception_message_on_failure = 'Failed doing some thing.'
some.thing()
exception_message_on_failure = 'Could not format data.'
output = format(neurons)
except e:
report_error(exception_message_on_failure)
raise e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment