示例#1
0
文件: code.py 项目: ziwar/openlibrary
def internalerror():
    i = web.input(_method='GET', debug='false')
    name = save_error()
    
    if i.debug.lower() == 'true':
        raise web.debugerror()
    else:
        msg = render.site(render.internalerror(name))
        raise web.internalerror(web.safestr(msg))
示例#2
0
def internalerror():
    i = web.input(_method='GET', debug='false')
    name = save_error()
    
    openlibrary.core.stats.increment('ol.internal-errors', 1)

    if i.debug.lower() == 'true':
        raise web.debugerror()
    else:
        msg = render.site(render.internalerror(name))
        raise web.internalerror(web.safestr(msg))
示例#3
0
def internalerror():
    i = web.input(_method='GET', debug='false')
    name = save_error()

    openlibrary.core.stats.increment('ol.internal-errors', 1)

    if i.debug.lower() == 'true':
        raise web.debugerror()
    else:
        msg = render.site(render.internalerror(name))
        raise web.internalerror(web.safestr(msg))
示例#4
0
def internalerror():
    i = web.input(_method='GET', debug='false')
    name = save_error()

    # TODO: move this stats stuff to plugins\openlibrary\stats.py
    # Can't have sub-metrics, so can't add more info
    openlibrary.core.stats.increment('ol.internal-errors')
    increment_error_count('ol.internal-errors-segmented')

    if i.debug.lower() == 'true':
        raise web.debugerror()
    else:
        msg = render.site(render.internalerror(name))
        raise web.internalerror(web.safestr(msg))