Commit d5176a46 by Alexander Kochetov Committed by Carsten Brandt

better exception message

- yii\db\BaseActiveRecord::findByCondition better exception - yii\db\ActiveRecord::findByCondition better exception close #6704
parent 4ab3dd0d
......@@ -184,7 +184,7 @@ class ActiveRecord extends BaseActiveRecord
}
$condition = [$pk => $condition];
} else {
throw new InvalidConfigException(get_called_class() . ' must have a primary key.');
throw new InvalidConfigException('"' . get_called_class() . '" must have a primary key.');
}
}
......
......@@ -129,7 +129,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
if (isset($primaryKey[0])) {
$condition = [$primaryKey[0] => $condition];
} else {
throw new InvalidConfigException(get_called_class() . ' must have a primary key.');
throw new InvalidConfigException('"' . get_called_class() . '" must have a primary key.');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment