The section Disabling on the System Error Handler docs page suggests that you can disable slim error handling by unsetting the errorHandlerkey in the container.
To completely disable Slim’s error handling, simply remove the error handler from the container:
unset($app->getContainer()['errorHandler']);
You are now responsible for handling any exceptions that occur in your application as they will not be handled by Slim.
This information is not true for PHP 7+ Throwables because they get handled by the PhpError class. If you are using PHP 7+ you have to use the following code to completely disable Slim's error handling:
The section Disabling on the System Error Handler docs page suggests that you can disable slim error handling by unsetting the
errorHandler
key in the container.This information is not true for PHP 7+ Throwables because they get handled by the
PhpError
class. If you are using PHP 7+ you have to use the following code to completely disable Slim's error handling: