def error(self, code=500):

        def wrapper(handler):
            self.error_handler[int(code)] = handler
            return handler

        return wrapper
Decorator: Register an output handler for a HTTP error code
dataset/ETHPy150Open Arelle/Arelle/arelle/webserver/bottle.py/Bottle.error