开发者

ZF does not catch exception

I'm trying to get my log writer working, however, I don't get that far.

When I throw an exception:

<?php

class IndexController extends Zend_Controller_Action
{
    public function indexAction()
    {
        throw new Exception('something bad happened!');
    }
}

it is not being caught by my errorcontroller.

checked my version is 1.11.4 with env development. I'm not sure what is wrong here, any help appreciated. I find it very weird.

( ! ) Exception: something bad happened! in C:\sites\mysite\application\controllers\IndexController.php on line 7
Call Stack
#   Time    Memory  Function    Location
1   0.0004  350304  {main}( )   ..\index.php:0
2   0.0705  5273208 Zend_Application->run( )    ..\index.php:31
3   0.0705  5273208 Zend_Application_Bootstrap_Bootstrap->run( )    ..\Application开发者_运维技巧.php:366
4   0.0705  5273384 Zend_Controller_Front->dispatch( )  ..\Bootstrap.php:97


I'd think you have throwExceptions set to 1 for your dev enviroment in your application.ini ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜