public function GetResponseForExceptionEvent::setException

Replaces the thrown exception

This exception will be thrown if no response is set in the event.

@api

Parameters

\Exception $exception The thrown exception:

1 call to GetResponseForExceptionEvent::setException()
GetResponseForExceptionEvent::__construct in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseForExceptionEvent.php

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseForExceptionEvent.php, line 68

Class

GetResponseForExceptionEvent
Allows to create a response for a thrown exception

Namespace

Symfony\Component\HttpKernel\Event

Code

public function setException(\Exception $exception) {
  $this->exception = $exception;
}