Tagged: error handling

0

Tornado Error Handling

I thought I’d keep posting my interesting tidbits about Tornado development and simple helpers here.  I found the need for some custom error messages, and along with everything else, really a need for a more robust base request handler… So I wrote one!  The premise is simple: Use this handler as your base class for ALL of your handlers and voila! Simple error handling.  This particular example only handles 404, but that’s because it’s an example.  Feel free to handle any and all codes you may choose with this: # Simple Tornado base handler with error handling class BaseHandler(tornado.web.RequestHandler): def...