1

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 

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

3 Comments

Did you mean resources.frontController.params.displayExceptions?
No, he means resources.frontController.throwExceptions
When I got home to check your answer, it was working :( Gave you the mark anyway since when I added it to my application.ini (it was not there though) the exception was again not caught. making it 0 solved my issue. Thanks, I don't know why it didn't happen last night, but at least now you gave me the line to 'ensure' it does not happen :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.