Thanks,
-----Original Message----- From: google-appengine@googlegroups.com [mailto:google-appeng...@googlegroups.com] On Behalf Of Savraj Sent: Sunday, March 15, 2009 10:38 PM To: Google App Engine Subject: [google-appengine] Re: custom handle_exception -- where do I get the traceback? http://sites.google.com/site/io/best-practices---building-a-production-quali ty-application-on-google-app-engine On Mar 15, 5:44 pm, "Steve Robillard" <steverobill...@gmail.com> wrote: > The talk sounds interesting can you provide a link? > > -----Original Message----- > From: google-appengine@googlegroups.com > > [mailto:google-appeng...@googlegroups.com] 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 google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---