The talk sounds interesting can you provide a link?
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Savraj
Sent: Sunday, March 15, 2009 4:26 PM
To: Google App Engine
Subject: [google-appengine] custom handle_exception -- where do I get the
traceback?
I'm watching the excellent talk by Ken Ashcraft, and I'm on slide 7
implementing "send email upon exception"
I'm almost there, but I can't populate my traceback variable... Where do I
get it from? I've basically matched the code in the slides -- but the
slides don't say where "traceback" comes from...
-s
class BaseRH(webapp.RequestHandler):
def handle_exception(self, exception, debug_mode):
lines = ''.join(traceback.format_exception(*sys.exc_info()))
######## ERROR HERE, traceback not
defined
logging.error(lines)
admin_mail("Exception",lines)
template_values = {}
if users.is_current_user_admin():
template_values['traceback'] = lines
self.response.out.write(template.render('error.html',
template_values))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---