Reputation: 2647
I would like to be able to catch the following error in laravel
PHP Fatal error: Allowed memory size of 201326592 bytes exhausted
I currently use the following script in the globals in order to catch other errors, but this specific error seems to bypass it.
App::error(function (Exception $exception, $code) {}
Thanks
Upvotes: 5
Views: 3635
Reputation: 2647
Turns out Laravel has a built in method to handle php fatal errors:
App::fatal(function($exception){});
See more on the laravel documentation
Thanks to @MarkBaker and @MateiMihai to help me understand better the situation.
Upvotes: 1