At the moment most of our event scripts look like this:
from app import dc
e = dc.Event(event)
try:
# do stuff
except:
e.error()
dc.Event is a wrapper around the event object that provides various shortcut methods.
e.error() is a nice error handler that logs to the database and hides the stack trace from the user.
Is there any way to hook this in globally so that it will be used for all event handlers without having to add this boilerplate every time?
Thanks.