(app, global_conf, **errorware)
return app
ErrorHandler Toggle

    If debug is enabled, this function will return the app wrapped in
    the WebError ``EvalException`` middleware which displays
    interactive debugging sessions when a traceback occurs.

    Otherwise, the app will be wrapped in the WebError
    ``ErrorMiddleware``, and the ``errorware`` dict will be passed into
    it. The ``ErrorMiddleware`` handles sending an email to the address
    listed in the .ini file, under ``email_to``.
ErrorHandler Toggle
ErrorHandler Toggle
def ErrorHandler(app, global_conf, **errorware):
    """ErrorHandler Toggle

    If debug is enabled, this function will return the app wrapped in
    the WebError ``EvalException`` middleware which displays
    interactive debugging sessions when a traceback occurs.

    Otherwise, the app will be wrapped in the WebError
    ``ErrorMiddleware``, and the ``errorware`` dict will be passed into
    it. The ``ErrorMiddleware`` handles sending an email to the address
    listed in the .ini file, under ``email_to``.

    """
    if asbool(global_conf.get('debug')):
        footer = footer_html % (pylons.config.get('traceback_host',
                                                  'pylonshq.com'),
                                pylons.__version__)
        py_media = dict(pylons=media_path)
        app = EvalException(app, global_conf,
                            templating_formatters=template_error_formatters,
                            media_paths=py_media, head_html=head_html,
                            footer_html=footer,
                            libraries=report_libs)
    else:
        app = ErrorMiddleware(app, global_conf, **errorware)
    return app
def ErrorHandler ( app , global_conf , * * errorware ) : if asbool ( global_conf . get ( 'debug' ) ) : footer = footer_html % ( pylons . config . get ( 'traceback_host' , 'pylonshq.com' ) , pylons . __version__ ) py_media = dict ( pylons = media_path ) app = EvalException ( app , global_conf , templating_formatters = template_error_formatters , media_paths = py_media , head_html = head_html , footer_html = footer , libraries = report_libs ) else : app = ErrorMiddleware ( app , global_conf , * * errorware ) return app