CC-4389: Convert all PHP errors to throw exceptions instead

-echo to stdout as well
This commit is contained in:
Martin Konecny 2012-09-11 00:50:56 -04:00
parent e275e286cb
commit 8db4c94af1
3 changed files with 9 additions and 2 deletions

View File

@ -15,7 +15,6 @@ require_once __DIR__.'/controllers/plugins/RabbitMqPlugin.php';
date_default_timezone_set(Application_Model_Preference::GetTimezone());
global $CC_CONFIG;
$airtime_version = Application_Model_Preference::GetAirtimeVersion();
$uniqueid = Application_Model_Preference::GetUniqueId();
@ -105,6 +104,10 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
protected function _initZFDebug()
{
Zend_Controller_Front::getInstance()->throwExceptions(true);
/*
if (APPLICATION_ENV == "development") {
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('ZFDebug');
@ -121,6 +124,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$frontController = $this->getResource('frontController');
$frontController->registerPlugin($debug);
}
*/
}
protected function _initRouter()

View File

@ -19,7 +19,6 @@ class LibraryController extends Zend_Controller_Action
->addActionContext('get-upload-to-soundcloud-status', 'json')
->addActionContext('set-num-entries', 'json')
->initContext();
}
public function indexAction()

View File

@ -37,6 +37,10 @@ if (file_exists('/usr/share/php/libzend-framework-php')) {
/** Zend_Application */
require_once 'Zend/Application.php';
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
date_default_timezone_set('UTC');
require_once (APPLICATION_PATH."/logging/Logging.php");