I think the best thing you can do is to have mainsome code in your function , for example ...:
try:
...normal body of your main goes here...
except:
from google.appengine.api import mail
import sys
mail.send_mail(sender="Your GAE App <yourappname@example.com>",
to="You <bobobobo@example.com>",
subject="GAE App error",
body="""
Your App Engine app raised an exception:
%s
""" % sys.exc_info()[:2])
(of course, you can better format information about exceptions, etc., etc.).
source
share