parameters: (self)
return_statement: return rv
docstring: Like :meth:`first` but aborts with 404 if not found instead of
          returning `None`.
docstring_summary: Like :meth:`first` but aborts with 404 if not found instead of
          returning `None`.
docstring_tokens: Like : meth : first but aborts with 404 if not found instead of returning None .
function: def first_or_404(self):
          """Like :meth:`first` but aborts with 404 if not found instead of
          returning `None`.
          """
          rv = self.first()
          if rv is None:
              raise tornado.web.HTTPError(404)
          return rv
function_tokens: def first_or_404 ( self ) : rv = self . first ( ) if rv is None : raise tornado . web . HTTPError ( 404 ) return rv