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".
When you've caught an exception in PHP it can still be reported to Flare:
try {
// Code that might throw an exception
} catch (Exception $exception) {
$flare->reportHandled($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.