/** * Wrap exception with additional info * * @param FilterResponseEvent $event */ public function onKernelResponse(FilterResponseEvent $event) { if ($this->getException()) { $this->notifier->reportException($this->getException()); $this->setException(null); } }
function it_skips_report_if_there_is_no_exception_on_kernel_response(Notifier $notifier, FilterResponseEvent $event) { $this->setException(null); $notifier->reportException(Argument::any())->shouldNotBeCalled(); $this->onKernelResponse($event); }