Browse Source

using the domain cake_error for messages intended for the developer

AD7six 15 years ago
parent
commit
b19ca3c95e
3 changed files with 6 additions and 6 deletions
  1. 2 2
      lib/Cake/Core/Configure.php
  2. 1 1
      lib/Cake/Error/exceptions.php
  3. 3 3
      lib/Cake/Log/CakeLog.php

+ 2 - 2
lib/Cake/Core/Configure.php

@@ -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'])) {

+ 1 - 1
lib/Cake/Error/exceptions.php

@@ -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);
 	}

+ 3 - 3
lib/Cake/Log/CakeLog.php

@@ -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;
 	}