示例#1
0
def pdberror():
    import sys
    try:
        import ipdb as pdb
    except ImportError:
        import pdb
    pdb.post_mortem(sys.exc_info()[2])
    return web.debugerror()
示例#2
0
def pdberror():
    import sys
    try:
        import ipdb as pdb
    except ImportError:
        import pdb
    pdb.post_mortem(sys.exc_info()[2])
    return web.debugerror()
示例#3
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))
示例#4
0
def internalerror():
    if config.DEBUG:
        return web.debugerror()

    web.header('Content-Type', 'text/html; charset=utf-8', unique=True)
    web.ctx.status = "500 Internal Server Error"
    print 'internal server error'
    page = web.djangoerror()
    _inform(page)
示例#5
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))
示例#6
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))
示例#7
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))
示例#8
0
 def internalerror(self):
     if web.config.get('debug'):
         return web.debugerror()
     html = self.dispatch('errors', 'error_500')
     return web.internalerror(html)
示例#9
0
 def internalerror(self):
     if web.config.get('debug'):
         return web.debugerror()
     html = self.dispatch('errors', 'error_500')
     return web.internalerror(html)