Skip to content

Commit

Permalink
Fix missed bits from merge with 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Mar 15, 2013
1 parent cf9691a commit 752d589
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Error/MissingDatasourceException.php
Expand Up @@ -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';

}
5 changes: 3 additions & 2 deletions lib/Cake/Log/LogTrait.php
Expand Up @@ -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);
}

}
2 changes: 1 addition & 1 deletion lib/Cake/Model/ConnectionManager.php
Expand Up @@ -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.'
Expand Down

0 comments on commit 752d589

Please sign in to comment.