Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Exceptions Handler

Victor Tesoura Júnior edited this page Mar 21, 2024 · 10 revisions

The exceptions handler doesn't work in laravel 10+ versions

Handler class

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
}

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.

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /