Simple WSGI application that returns 200 OK response with 'Hellow
    world!' in the body. If an uncaught exception is thrown, it is reported to
    BugzScout.

    :param environ: WSGI environ
    :param start_response: function that accepts status string and headers

def bugzscout_app(environ, start_response):
    """Simple WSGI application that returns 200 OK response with 'Hellow
    world!' in the body. If an uncaught exception is thrown, it is reported to
    BugzScout.

    :param environ: WSGI environ
    :param start_response: function that accepts status string and headers
    """
    try:
        start_response('200 OK', [('content-type', 'text/html')])
        return ['Hellow world!']
    except Exception as ex:
        # Set the description to a familiar string with the exception
        # message. Add the stack trace to extra.
        b.submit_error('An error occurred in MyApp: {0}'.format(ex.message),
                       extra=traceback.extract_tb(*sys.exc_info()))

        # Reraise the exception.
        raise ex