Ejemplo n.º 1
0
def application(environ, start_response):
    request = webob.Request(environ)
    status = '200 OK'

    headers = [('Content-Type', 'text/html')]

    start_response(status, headers)
    
    yield '<p>Hello world</p>'

    try:
        # will raise a NameError about 'bar' not being defined
        foo = bar
    except:
        # report full exception info
        ratchet.report_exc_info(sys.exc_info(), request)
        
        # and/or, just send a string message with a level
        ratchet.report_message("Here's a message", 'info', request)
    
        yield '<p>Caught an exception</p>'
Ejemplo n.º 2
0
 def process_exception(self, request, exc):
     ratchet.report_exc_info(sys.exc_info(), request)
Ejemplo n.º 3
0
def handle_error(settings, request):
    ratchet.report_exc_info(sys.exc_info(), request)