code: def process_uncaught_exception(self, e):
          
          # Add information about the actual exception to the log message
          # This includes the file, line and piece of code causing the exception.
          # exc_info=True adds the full stack trace to the log message.
          exc_file_fullpath, exc_file, exc_lineno, exc_func, exc_line = (
              workflows.logging.get_exception_source()
          )
          added_information = {
              "workflows_exc_lineno": exc_lineno,
              "workflows_exc_funcName": exc_func,
              "workflows_exc_line": exc_line,
              "workflows_exc_pathname": exc_file_fullpath,
              "workflows_exc_filename": exc_file,
          }
          for field in filter(lambda x: x.startswith("workflows_log_"), dir(e)):
              added_information[field[14:]] = getattr(e, field, None)
          self.log.critical(
              "Unhandled service exception: %s", e, exc_info=True, extra=added_information
          )
docs: This is called to handle otherwise uncaught exceptions from the service.
          The service will terminate either way, but here we can do things such as
          gathering useful environment information and logging for posterity.