diff --git a/src/Console/Kernel.php b/src/Console/Kernel.php index ba787cb..a76cbfd 100644 --- a/src/Console/Kernel.php +++ b/src/Console/Kernel.php @@ -23,6 +23,7 @@ class Kernel extends \Illuminate\Foundation\Console\Kernel * * @param \Exception $e * @return void + * @throws \Exception */ protected function reportException(Exception $e) { diff --git a/src/Exceptions/Handler.php b/src/Exceptions/Handler.php new file mode 100644 index 0000000..1ead77d --- /dev/null +++ b/src/Exceptions/Handler.php @@ -0,0 +1,20 @@ +resolveApplication(); + $this->resolveApplicationExceptionHandler($app); $this->resolveApplicationCore($app); $this->resolveApplicationConfiguration($app); $this->resolveApplicationHttpKernel($app); @@ -245,4 +246,15 @@ protected function resolveApplicationHttpKernel($app) { $app->singleton('Illuminate\Contracts\Http\Kernel', 'Orchestra\Testbench\Http\Kernel'); } + + /** + * Resolve application HTTP exception handler. + * + * @param \Illuminate\Foundation\Application $app + * @return void + */ + protected function resolveApplicationExceptionHandler($app) + { + $app->singleton('Illuminate\Contracts\Debug\ExceptionHandler', 'Orchestra\Testbench\Exceptions\Handler'); + } }