I\'ve setup the ZendSkeletonApplication with ZF 2.0.3
and I am unable to catch exceptions in my controllers. For instance if I put the below piece of code in
You are throwing PHP's generic Exception
throw new \Exception("My exception");
but you catch the Exception from the current namespace
} catch (Exception $e) {
Assuming your controller is in Application\Controller
, you either have to declare
use \Exception;
above your class to import the global Exception into the current namespace or
} catch (\Exception $e) {
to catch PHP's global Exception.