def __init__(self): status = '500 Internal Server Error' headers = {'Content-Type': 'text/html'} HTTPError.__init__(self, status, headers, _Pretty.handle500())
def __init__(self, message=None): status = "400 Bad Request" headers = {'Content-Type': 'text/html'} HTTPError.__init__(self, status, headers, message or self.message)
def __init__(self): status = '404 Not Found' headers = {'Content-Type': 'text/html'} HTTPError.__init__(self, status, headers, _Pretty.handle404())
def nomethod(cls): return HTTPError(*build_error( '405 Method Not Allowed', 'This HTTP Method is not supported on %s' % (cls.__name__)))
def internalerror(): return HTTPError(*build_error('500 Internal Server Error', 'An unexpected error occured'))
def notfound(): return HTTPError( *build_error('404 Not Found', 'This page is not found'))