Adds an error handler that will convert PHP errors to ErrorException
instances.
Internally, wraps the call to $next() in a try/catch block, catching
all PHP Throwables (PHP 7) and Exceptions (PHP 5.6 and earlier).
When an exception is caught, an appropriate error response is created
and returned instead; otherwise, the response returned by $next is
used.
public process ( Psr\Http\Message\ServerRequestInterface $request, Interop\Http\Middleware\DelegateInterface $delegate ) : Psr\Http\Message\ResponseInterface | ||
$request | Psr\Http\Message\ServerRequestInterface | |
$delegate | Interop\Http\Middleware\DelegateInterface | |
return | Psr\Http\Message\ResponseInterface |