Skip to content

Commit

Permalink
using the domain cake_error for messages intended for the developer
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed Mar 19, 2011
1 parent f95340b commit b19ca3c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Core/Configure.php
Expand Up @@ -70,13 +70,13 @@ public static function bootstrap($boot = true) {
));

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'])) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Error/exceptions.php
Expand Up @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Log/CakeLog.php
Expand Up @@ -82,15 +82,15 @@ 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']);
$className = self::_getLogger($loggerName);
$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;
Expand All @@ -109,7 +109,7 @@ protected static function _getLogger($loggerName) {

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;
}
Expand Down

0 comments on commit b19ca3c

Please sign in to comment.