def make_errordocument(app, global_conf, **kw):
    """
    Paste Deploy entry point to create a error document wrapper.

    Use like::

        [filter-app:main]
        use = egg:Paste#errordocument
        next = real-app
        500 = /lib/msg/500.html
        404 = /lib/msg/404.html
    """
    map = {}
    for status, redir_loc in kw.items():
        try:
            status = int(status)
        except __HOLE__:
            raise ValueError('Bad status code: %r' % status)
        map[status] = redir_loc
    forwarder = forward(app, map)
    return forwarder
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/errordocument.py/make_errordocument