def report_exception(self, http_context=None, user=None):
        """ Reports the details of the latest exceptions to Stackdriver Error
            Reporting.

          :type http_context: :class`google.cloud.error_reporting.HTTPContext`
          :param http_context: The HTTP request which was processed when the
                               error was triggered.

          :type user: str
          :param user: The user who caused or was affected by the crash. This
                       can be a user ID, an email address, or an arbitrary
                       token that uniquely identifies the user. When sending an
                       error report, leave this field empty if the user was
                       not logged in. In this case the Error Reporting system
                       will use other data, such as remote IP address,
                       to distinguish affected users.

           Example::

                >>>     try:
                >>>         raise NameError
                >>>     except Exception:
                >>>         client.report_exception()
        """
        self._send_error_report(
            traceback.format_exc(), http_context=http_context, user=user
        )
Reports the details of the latest exceptions to Stackdriver Error
            Reporting.

          :type http_context: :class`google.cloud.error_reporting.HTTPContext`
          :param http_context: The HTTP request which was processed when the
                               error was triggered.

          :type user: str
          :param user: The user who caused or was affected by the crash. This
                       can be a user ID, an email address, or an arbitrary
                       token that uniquely identifies the user. When sending an
                       error report, leave this field empty if the user was
                       not logged in. In this case the Error Reporting system
                       will use other data, such as remote IP address,
                       to distinguish affected users.

           Example::

                >>>     try:
                >>>         raise NameError
                >>>     except Exception:
                >>>         client.report_exception()