我们从Python开源项目中,提取了以下17个代码示例,用于说明如何使用werkzeug.exceptions()。
def abort(status, *args, **kwargs): ''' Raises an :py:exc:`HTTPException` for the given status code or WSGI application:: abort(404) # 404 Not Found abort(Response('Hello World')) Can be passed a WSGI application or a status code. If a status code is given it's looked up in the list of exceptions and will raise that exception, if passed a WSGI application it will wrap it in a proxy WSGI exception and raise that:: abort(404) abort(Response('Hello World')) ''' return _aborter(status, *args, **kwargs)