Slim 4 - How to handle multiple errors

Hi Daniel

Thanks a lot for your support! I really appreciate that.
I implemented the ErrorHandlerMiddleware, like you suggested and it works like a charm.
In the beginning I struggled a bit, because the errors were not logged. The problem was, that my test-code, which produced the php-warning was in my app.php. When I put the code in a controller, the warning was logged like expected.

The ErrorHandlerMiddleware is now combined with a custom ErrorHandler. So in case of php warnings and notices I get a log entry and a mail from monolog. If there’s an error, the ErrorHandler shows either a Twig 404 or a Twig Error page and logs the error.

Nomäl viele Dank und än Gruäss us Frauefäld