def ErrorDocuments(app, global_conf, mapper, **kw): """Wraps the app in error docs using Paste RecursiveMiddleware and ErrorDocumentsMiddleware """ if global_conf is None: global_conf = {} return RecursiveMiddleware( StatusBasedForward(app, global_conf=global_conf, mapper=mapper, **kw))
def ErrorDocuments(app, global_conf=None, mapper=None, **kw): """Wraps the app in error docs using Paste RecursiveMiddleware and ErrorDocumentsMiddleware All the args are passed directly into the ErrorDocumentsMiddleware. If no mapper is given, a default error_mapper is passed in. """ if global_conf is None: global_conf = {} if mapper is None: mapper = error_mapper return RecursiveMiddleware( StatusBasedForward(app, global_conf=global_conf, mapper=mapper, **kw))