Thursday, May 24, 2012

Can't throw an Exception in bootstrap?

Cake 2.2:

All I did was test out the Exceptions handling, and I got this problem during dispatch.  It appears that Cake failed to include a base library file 'Controller'

The logic was a simple BadRequestException thrown in my bootstrap.php file.  It is important to have exceptions here so I can detect any configuration problems right away and report it to the user.

( ! ) Fatal error: Class 'Controller' not found in /Applications/MAMP/htdocs/electionstats.com/app/Controller/AppController.php on line 41
Call Stack
#TimeMemoryFunctionLocation
10.00551173792ErrorHandler::handleException( )../ErrorHandler.php:0
20.00601199432ExceptionRenderer->__construct( )../ErrorHandler.php:126
30.00601199432ExceptionRenderer->_getController( )../ExceptionRenderer.php:92
40.00651354152App::load( )../App.php:0
50.00651359400include( '/Applications/MAMP/htdocs/electionstats.com/lib/Cake/Controller/CakeErrorController.php' )../App.php:540
60.00651359728App::load( )../App.php:0
70.01061563080include( '/Applications/MAMP/htdocs/electionstats.com/app/Controller/AppController.php' )../App.php:540

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: