Skip to main content

Posts

Showing posts from June, 2013

Recent tweak made to Laravel error handlers

For anyone configuring their own error handlers in Laravel 4.x, a feature suggestion I made has been implemented to have the handlers placed at the top of the queue rather than bottom. This default behaviour makes more sense given that as you get further into your app, you'll likely be defining handlers less likely to return a response, or more likely to want to pre-empt other error handlers entirely. While that's a safe assumption, there's still the mechanism to add a handler to the bottom of the pile with pushError() if you end up needing it still. Here's a quick reminder of how you can use either of these features: App::error(function (Exception $exception) { /* Your handler here! */ }); App::pushError(function (Exception $exception) { /* Your handler here! */ });