New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

agilesdesign/exceptum

Custom Exception Handling for Laravel
18 2
Install
composer require agilesdesign/exceptum:v1.0.0-alpha.1
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...

660,512,042 9,702
laravel/framework

The Laravel Framework.

625,568,548 34,998
laravel/tinker

Powerful REPL for the Laravel framework.

531,591,559 7,442
laravel/serializable-closure

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

450,320,528 608
nunomaduro/collision

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

424,642,029 4,662

Version History

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