zendframework/zf2 — pull request #3405 by radnan (2013-01-10 23:33:52+00:00)
Title: fix dispatcher to catch legitimate exceptions

All service managers throw the same `ServiceNotFound` and `ServiceNotCreated` exceptions.

The dispatcher made no distinctions between:
* exceptions thrown in the event a controller can't be loaded; and
* exceptions thrown from initializers within ControllerLoader

The first case is a legitimate "controller-not-found" error and can be tested for using the "ServiceManager::has()" method whereas the second case needs to be caught and forwarded to a 500 status page.