class ErrorHandlerMiddleware implements MiddlewareInterface (View source)

Basic error handler middleware that forwards all exceptions to given request handler.

Methods

__construct(RequestHandlerInterface $handler)

ErrorHandlerMiddleware constructor.

ResponseInterface
process(ServerRequestInterface $request, RequestHandlerInterface $handler)

{@inheritdoc}

Details

__construct(RequestHandlerInterface $handler)

ErrorHandlerMiddleware constructor.

Parameters

RequestHandlerInterface $handler The request handler used to handle exceptions

ResponseInterface process(ServerRequestInterface $request, RequestHandlerInterface $handler)

{@inheritdoc}

Parameters

ServerRequestInterface $request
RequestHandlerInterface $handler

Return Value

ResponseInterface