'Like :meth:`Flask.errorhandler` but for a blueprint.  This
handler is used for all requests, even if outside of the blueprint.'

def app_errorhandler(self, code):

    def decorator(f):
        self.record_once((lambda s: s.app.errorhandler(code)(f)))
        return f
    return decorator
