class Registry
Flarum's central registry of known error types.
It knows how to deal with errors raised both within Flarum's core and outside of it, map them to error "types" and how to determine appropriate HTTP status codes for them.
Methods
Details
at
line 28
__construct(array $statusMap, array $classMap, array $handlerMap)
at
line 47
HandledError
handle(Throwable $error)
<p>Map exceptions to handled errors.</p>
<p>This can map internal ({\Flarum\Foundation\KnownError}) as well as external exceptions (any classes inheriting from \Throwable) to instances of {\Flarum\Foundation\ErrorHandling\HandledError}.</p> <p>Even for unknown exceptions, a generic fallback will always be returned.</p>