O'Reilly logo

Zend Framework 1 to 2 Migration Guide by Bart McLeod

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Error Handling and Logging

No ErrorController

ZF2 is all about the explicit configuration of dependencies and events. Error handling is subject to that, as well. Error handling can be easily configured, but you have to know where. On the other side of the spectrum, where you want to be completely in control, you can implement your own exception strategy, and then it is completely up to you what you do with the exception.

Simple Migration Steps for Error Handling

If you just want to migrate an existing application, then think of it in terms of what you had in ZF1 and how it translates to ZF2. In ZF1, you had an ErrorController, and you could configure the application to display the exceptions—or not—by configuring resources.frontController.params.displayExceptions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required