teepluss / laravel-hmvc

HMVC is a tool for making internal request.
76 stars 20 forks source link

Update Hmvc.php to handle exceptions thrown within call #15

Closed phazei closed 9 years ago

phazei commented 9 years ago

It will catch anything thrown within the dispatch. Then it calls the default handler that would normally take care of the exception, and gets the response from that as dispatch and treats it accordingly.

phazei commented 9 years ago

This was inspired by #7

malhal commented 9 years ago

In Laravel 5 I think it's this:

$dispatch = App::__get('Illuminate\Contracts\Debug\ExceptionHandler')->render($request, $e);