Your Teacher | Jeffrey Way's avatar
Hi, I'm Jeffrey. I'm the creator of Laracasts and spend most of my days building the site and thinking of new ways to teach confusing concepts. I live in Orlando, Florida with my wife and two kids.

About This Episode

Published on Aug 17th, 2017

When an exception is thrown in your app, you can optionally let it bubble up to app/Exceptions/Handler.php. Here, you may type-check the exception to determine the appropriate response to return. While this is certainly useful, over the lifetime of a project, you'll notice that this method grows and grows.

A more object-oriented approach would be to allow the exception to determine how to render itself. And now, in Laravel 5.5, you can do that very thing.

Back to Series Button