-
-
Notifications
You must be signed in to change notification settings - Fork 0
Exceptions Handler
Victor Tesoura Júnior edited this page Mar 21, 2024
·
10 revisions
The exceptions handler doesn't work in laravel 10+ versions
Bellow the example, of how your Exception handler needs to look like:
<?php namespace App\Exceptions; use Txsoura\Core\Exceptions\CoreHandler; use Throwable; class Handler extends CoreHandler { // ... other exceptions }
The error messages will come in the language based on the locale from translations, in which only en, pt, and es are available.
All exceptions below have been treated by core, you should only extend CoreHandler on Handler.class as shown in the previous example.
-
ModelNotFoundException; -
RelationNotFoundException; -
InvalidSignatureException; -
MethodNotAllowedHttpException; -
NotFoundHttpException; -
ThrottleRequestsException; -
AccessDeniedHttpException; -
UnauthorizedHttpException; -
RouteNotFoundException.