class ErrorHandler implements ErrorHandlerInterface (View source)

Methods

__construct(ResponseService $response_service, RunInterface|null $whoops, boolean $debug = false)

Constructor.

void
register()

Register any necessary error, exception and shutdown handlers.

void
unregister()

Unregister any registered error, exception and shutdown handlers.

ResponseInterface
getResponse(RequestInterface $request, Exception $exception)

Get a response representing the specified exception.

Details

__construct(ResponseService $response_service, RunInterface|null $whoops, boolean $debug = false)

Constructor.

Parameters

ResponseService $response_service
RunInterface|null $whoops
boolean $debug

void register()

Register any necessary error, exception and shutdown handlers.

Return Value

void

void unregister()

Unregister any registered error, exception and shutdown handlers.

Return Value

void

ResponseInterface getResponse(RequestInterface $request, Exception $exception)

Get a response representing the specified exception.

Parameters

RequestInterface $request
Exception $exception

Return Value

ResponseInterface