Closed shadowhand closed 6 years ago
Maybe we could add a throwable handler, optionally at first as it’s a breaking change. Then the exception handler can proxy out to the throwable handler. Then we can unify for the next major release.
Covered by #205
The current implementation of
getExceptionHandler()
offers no way to log exceptions that are caught. This is extremely bad for debugging, as there is no way to know what the underlying exception was.The
JsonStrategy
should probably use PSR-3LoggerAwareInterface
and the anonymous class modified to make use of it. Or at least have acallable $onException
handler that will be triggered when an exception is caught.Also worth noting that
Exception
is used instead ofThrowable
, which means that not all errors are being caught by this middleware.