code: private function collectException($httpRequest, $httpResponse, $exception)
      {
          if ($this->profiler) {
              $collector = new ExceptionDataCollector();
              $collector->collect($httpRequest, $httpResponse, $exception);
              $this->profiler->add($collector);
          }
      }
docs: Collect exception.
  
  @param HttpRequest  $httpRequest
  @param HttpResponse $httpResponse
  @param \Exception   $exception