diff --git a/lib/Cake/Error/MissingDatasourceException.php b/lib/Cake/Error/MissingDatasourceException.php index 4c34ec0c589..48c8f2f58c1 100644 --- a/lib/Cake/Error/MissingDatasourceException.php +++ b/lib/Cake/Error/MissingDatasourceException.php @@ -25,6 +25,6 @@ */ class MissingDatasourceException extends Exception { - protected $_messageTemplate = 'Datasource class %s could not be found.'; + protected $_messageTemplate = 'Datasource class %s could not be found. %s'; } diff --git a/lib/Cake/Log/LogTrait.php b/lib/Cake/Log/LogTrait.php index ea3a73348a9..7ce97f97561 100644 --- a/lib/Cake/Log/LogTrait.php +++ b/lib/Cake/Log/LogTrait.php @@ -27,13 +27,14 @@ trait LogTrait { * * @param string $msg Log message * @param integer $type Error type constant. Defined in app/Config/logging.php. + * @param string $scope The name of the log scope. * @return boolean Success of log write */ - public function log($msg, $type = LOG_ERR) { + public function log($msg, $type = LOG_ERR, $scope = null) { if (!is_string($msg)) { $msg = print_r($msg, true); } - return Log::write($type, $msg); + return Log::write($type, $msg, $scope); } } diff --git a/lib/Cake/Model/ConnectionManager.php b/lib/Cake/Model/ConnectionManager.php index 7115f8e1f95..cb54762d96d 100644 --- a/lib/Cake/Model/ConnectionManager.php +++ b/lib/Cake/Model/ConnectionManager.php @@ -99,7 +99,7 @@ public static function getDataSource($name) { $class = static::loadDataSource($name); if (strpos(App::location($class), 'Datasource') === false) { - throw new MissingDatasourceException(array( + throw new Error\MissingDatasourceException(array( 'class' => $class, 'plugin' => null, 'message' => 'Datasource is not found in Model/Datasource package.'