def __call__(self, req): try: return req.get_response(self.application) except Exception as exc: LOG.exception(exc) return req.get_response(Fault(self._error(exc)))