Exemple #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()
Exemple #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()
Exemple #3
0
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))
Exemple #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)
Exemple #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))
Exemple #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))
Exemple #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))
Exemple #8
0
 def internalerror(self):
     if web.config.get('debug'):
         return web.debugerror()
     html = self.dispatch('errors', 'error_500')
     return web.internalerror(html)
Exemple #9
0
 def internalerror(self):
     if web.config.get('debug'):
         return web.debugerror()
     html = self.dispatch('errors', 'error_500')
     return web.internalerror(html)