Catching error exceptions in Laravel 4

Viewed 9134

From the documentation it says we can catch all 404 like so:

App::missing(function($exception)
{
    return Response::view('errors.missing', array(), 404);
});

And we can also do things like:

App::abort(404);
App::abort(403);

All 404 gets handled by the App::missing

All other errors gets handled by:

App::error(function( HttpException $e)
{
    //handle the error
});

But the question is How do i handle each of the error like if its a 403 I will display this if its a 400 I will display another error

1 Answers
Related