Handling exceptions
When an exception is thrown in an application, the application stops executing and the exception is reported to Flare. However, there are cases where you might want to handle the exception so that the application can continue running. And the user isn't presented with an error message.
In such cases it might still be useful to report the exception to Flare, so you'll have a correct overview of what's going on within your application. We call such exceptions "handled exceptions".
Within Laravel, it is possible to handle an exception by catching it and then reporting it:
try {
// Code that might throw an exception
} catch (Exception $exception) {
report($exception);
}
In Flare, we'll show that the exception was handled, it is possible to filter these exceptions. You'll find more about filtering exceptions here.