| Package Data | |
|---|---|
| Maintainer Username: | danieletulone | 
| Maintainer Contact: | danieletulone.work@gmail.com (danieletulone) | 
| Package Create Date: | 2021-03-11 | 
| Package Last Update: | 2021-06-21 | 
| Home Page: | |
| Language: | PHP | 
| License: | Unknown | 
| Last Refreshed: | 2025-10-28 03:07:54 | 
| Package Statistics | |
|---|---|
| Total Downloads: | 119 | 
| Monthly Downloads: | 0 | 
| Daily Downloads: | 0 | 
| Total Stars: | 0 | 
| Total Watchers: | 0 | 
| Total Forks: | 0 | 
| Total Open Issues: | 0 | 
## Usage
Register provider into bootstrap/app.php:
$app->register(Marlon\Lumen\Providers\MarlonLumenServiceProvider::class);
Add ErrorHandler trait to app/Exceptions/Handler.php:
namespace App\Exceptions;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Validation\ValidationException;
use Laravel\Lumen\Exceptions\Handler as ExceptionHandler;
use Marlon\Lumen\ErrorHandler;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Throwable;
class Handler extends ExceptionHandler
{
    use ErrorHandler;
    /**
    * A list of the exception types that should not be reported.
    *
    * @var array
    */
    protected $dontReport = [
        AuthorizationException::class,
        HttpException::class,
        ModelNotFoundException::class,
        ValidationException::class,
    ];
    /**
    * Report or log an exception.
    *
    * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
    *
    * @param  \Throwable  $exception
    * @return void
    *
    * @throws \Exception
    */
    public function report(Throwable $exception)
    {
        parent::report($exception);
    }
}