Can't catch exceptions in laravel

Catching Throwable did the trick.
Have no idea why? Anyone does?


It does not catch the exception because you are trying to catch \Exception which Symfony\Component\Debug\Exception\FatalThrowableError does not extend.

Instead try to catch the actual exception by importing it..

use Symfony\Component\Debug\Exception\FatalThrowableError;

And then you can do..

try {
    // 
} catch(FatalThrowableError e) {
    // 
}

Edit

Ok, so in addition to the above solution it seems PHP 7+ handles error a bit differently than PHP 5. So try this..

try {
    // 
} catch(Error $e) {
    // This should work
} catch(Throwable $e) {
    // This should work as well
}