def wrap(self, req, result):
if isinstance(result, webob.exc.HTTPException):<EOL><INDENT>raise result<EOL><DEDENT>elif isinstance(result, webob.Response):<EOL><INDENT>raise exceptions.AppathyResponse(result)<EOL><DEDENT>elif isinstance(result, response.ResponseObject):<EOL><INDENT>result._bind(self)<EOL>return result<EOL><DEDENT>else:<EOL><INDENT>return self.resp_type(req, result, _descriptor=self)<EOL><DEDENT>
Wrap method return results.  The return value of the action
method and of the action extensions is passed through this
method before being returned to the caller.  Instances of
`webob.Response` are thrown, to abort the rest of action and
extension processing; otherwise, objects which are not
instances of ResponseObject will be wrapped in one.