def handle_exception_404(self, e):
        """Handle the given exception. Log, sets the response code to 404 and
        output the exception message as an error message.

        :param e: Exception which is being handled.
        :type e: :class:`Exception`
        """
        logger.debug("A 404 Not Found exception occurred while handling "
                     "the request.")
        self.response.body_raw = {'error': 'Not Found'}
        self.response.status = 404
Handle the given exception. Log, sets the response code to 404 and
        output the exception message as an error message.

        :param e: Exception which is being handled.
        :type e: :class:`Exception`