class HandleErrors implements MiddlewareInterface
Catch exceptions thrown in a PSR-15 middleware stack and handle them safely.
All errors will be rendered using the provided formatter. In addition, unknown errors will be passed on to one or multiple {\Flarum\Foundation\ErrorHandling\Reporter} instances.
Properties
protected Registry | $registry | |||
protected HttpFormatter | $formatter | |||
protected Reporter[] | $reporters |
Methods
ResponseInterface
process(ServerRequestInterface $request, RequestHandlerInterface $handler)
<p>Catch all errors that happen during further middleware execution.</p>
Details
at
line 44
__construct(Registry $registry, HttpFormatter $formatter, iterable $reporters)
at
line 54
ResponseInterface
process(ServerRequestInterface $request, RequestHandlerInterface $handler)
<p>Catch all errors that happen during further middleware execution.</p>