agilesdesign/exceptum

Custom Exception Handling for Laravel
18 2
Install
composer require agilesdesign/exceptum
Latest Version:v1.0.0-alpha.1
License:MIT
Last Updated:Jan 5, 2017
Links: GitHub  ·  Packagist
Maintainer: jrseliga

exceptum

Custom Exception Handling for Laravel

Installation

Include through composer

composer require agilesdesign/exceptum

Add to provider list
'providers' => [
    Exceptum\Providers\ExceptumServiceProvider::class,
];

Usage

Create an Abettor

Abettor is synonymous with App\Exceptions\Handler in it's intent, but is not an extension of it.

Currently it only supports implementing the response provided to the render method on App\Exception\Handler

class AuthorizatonExceptionAbettor implements Abettor
{
    public function render($request, Exception $exception)
    {
        // handle exception
    }
}
Register Mapping

Exceptum falls back to Laravel's App\Exception\Handler class unless it knows about an Abettor responsible for Exception thrown.

To tell Exceptum about an Abettor register a mapping in your ServiceProviders register method

public function register()
{
    Exceptum::map(AuthorizationException::class, AuthorizationExceptionAbettor::class);
}

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

598,760,099 34,966
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

403,217,078 4,664

Version History

Pre-releases (1)
Version Released License
v1.0.0-alpha.1 MIT