You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've recently updated to Laravel 11. I notice that your guide for Laravel 11 utilises Integration::handles() and not Integration::captureUnhandledException().
Am I still able to use this or must I use handles. If so, I need to exclude certain exceptions as per my code, should I utilise $e or $exceptions.
Solution Brainstorm
My code
->withExceptions(function (Exceptions$exceptions) {
$exceptions->reportable(function (Throwable$e) {
if ($e !== null && is_string($e->getMessage())) {
if (Str::contains($e->getMessage(), ['has been attempted too many times', 'Deadlock found when trying to get lock'])) {
returnfalse;
}
}
Integration::captureUnhandledException($e);
});
});
The text was updated successfully, but these errors were encountered:
You are totally fine to keep using Integration::captureUnhandledException (we do it too), if you upgrade from Laravel 10 there is nothing for you to change if you don't want to. The guide for Laravel 11 is for new installations or people using the new L11 structure. Our L10 docs are also available if you need them: https://docs.sentry.io/platforms/php/guides/laravel/other-versions/laravel8-10/.
Problem Statement
Hi,
I've recently updated to Laravel 11. I notice that your guide for Laravel 11 utilises
Integration::handles()
and notIntegration::captureUnhandledException()
.Am I still able to use this or must I use
handles
. If so, I need to exclude certain exceptions as per my code, should I utilise$e
or$exceptions
.Solution Brainstorm
My code
The text was updated successfully, but these errors were encountered: