code: public function reportException(\Exception $ex)
      {
          $report = new ErrorStreamReport();
          $report->error_group = $ex->getMessage().':'.$ex->getLine();
          $report->line_number = $ex->getLine();
          $report->file_name = $ex->getFile();
          $report->message = $ex->getMessage();
          $report->stack_trace = $ex->getTraceAsString();
          $report->severity = 3;
          return $this->report($report);
      }
docs: Report an exception to the errorstream website.
  @param \Exception $ex
  @return string