When the below code, PHP should catch the exception and continue execution without throwing any error/exception page.
Question: However with Laravel 4, the exception page shows up. Setting app.debug
to false
only hides the stack trace. How do you force Laravel to ignore and continue execution?
try
{
SomeOperation();
}
catch (SomeException $e)
{
// do nothing... php will ignore and continue
}
You may turn off error details by setting the debug option in your app/config/app. php file to false .
The abort function throws an HTTP exception which will be rendered by the exception handler: abort(403) .
Reporting ExceptionsAll exceptions are handled by the App\Exceptions\Handler class. This class contains a register method where you may register custom exception reporting and rendering callbacks.
That can be a namespace problem.
Did you try to put a slash before the exception?
catch(\Exception $e)
{
Log::error($e->getMessage());
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With