using the domain cake_error for messages intended for the developer

This commit is contained in:
AD7six 2011-03-19 18:09:58 +01:00
parent f95340b361
commit b19ca3c95e
3 changed files with 6 additions and 6 deletions

View file

@ -70,13 +70,13 @@ class Configure {
));
if (!include(CONFIGS . 'core.php')) {
trigger_error(__d('cake', "Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", CONFIGS), E_USER_ERROR);
trigger_error(__d('cake_error', "Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", CONFIGS), E_USER_ERROR);
}
App::init();
App::build();
if (!include(CONFIGS . 'bootstrap.php')) {
trigger_error(__d('cake', "Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", CONFIGS), E_USER_ERROR);
trigger_error(__d('cake_error', "Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", CONFIGS), E_USER_ERROR);
}
$level = -1;
if (isset(self::$_values['Error']['level'])) {

View file

@ -184,7 +184,7 @@ class CakeException extends RuntimeException {
public function __construct($message, $code = 500) {
if (is_array($message)) {
$this->_attributes = $message;
$message = __d('cake', $this->_messageTemplate, $message);
$message = __d('cake_error', $this->_messageTemplate, $message);
}
parent::__construct($message, $code);
}

View file

@ -82,7 +82,7 @@ class CakeLog {
*/
public static function config($key, $config) {
if (empty($config['engine'])) {
throw new CakeLogException(__d('cake', 'Missing logger classname'));
throw new CakeLogException(__d('cake_error', 'Missing logger classname'));
}
$loggerName = $config['engine'];
unset($config['engine']);
@ -90,7 +90,7 @@ class CakeLog {
$logger = new $className($config);
if (!$logger instanceof CakeLogInterface) {
throw new CakeLogException(sprintf(
__d('cake', 'logger class %s does not implement a write method.'), $loggerName
__d('cake_error', 'logger class %s does not implement a write method.'), $loggerName
));
}
self::$_streams[$key] = $logger;
@ -109,7 +109,7 @@ class CakeLog {
App::uses($loggerName, $plugin . 'Log/Engine');
if (!class_exists($loggerName)) {
throw new CakeLogException(__d('cake', 'Could not load class %s', $loggerName));
throw new CakeLogException(__d('cake_error', 'Could not load class %s', $loggerName));
}
return $loggerName;
}