def internalerror(self): """Returns HTTPError with '500 internal error' message""" parent = self.get_parent_app() if parent: return parent.internalerror() else: return web._InternalError()
def debugerror(): """ A replacement for `internalerror` that presents a nice page with lots of debug information for the programmer. (Based on the beautiful 500 page from [Django](http://djangoproject.com/), designed by [Wilson Miner](http://wilsonminer.com/).) """ return web._InternalError(djangoerror())
def internalerror(self): """Returns HTTPError with '500 internal error' message""" parent = self.get_parent_app() if parent: return parent.internalerror() elif web.config.get('debug'): import debugerror return debugerror.debugerror() else: return web._InternalError()
def internalerror(self): # ----------if any exception happens in code and not catched/handled, #-----------we return an 500 error: unhandled internal error--------- """Returns HTTPError with '500 internal error' message""" parent = self.get_parent_app() if parent: return parent.internalerror() elif web.config.get('debug'): import debugerror return debugerror.debugerror() else: return web._InternalError()
def debugerror(): return web._InternalError(djangoerror())