Improving exception message
Publish PHP Package / docker (push) Successful in 5s Details

This commit is contained in:
Pavel Shevaev 2024-03-12 19:16:51 +03:00
parent ff4ae2682c
commit 0abaa301c3
1 changed files with 1 additions and 1 deletions

View File

@ -1028,7 +1028,7 @@ function config_load_ex(string $conf_dir, string $file, array $arr, ?int $id = n
throw new Exception("No such class '$klass'");
$cnf = new $klass;
if(!is_a($cnf, $GLOBALS['CONFIG_BASE_CLASS']))
throw new Exception("Class '$klass' must inherit from '{$GLOBALS['CONFIG_BASE_CLASS']}'");
throw new Exception("'$klass' is not subclass of '".ltrim($GLOBALS['CONFIG_BASE_CLASS'], '\\')."'");
$cnf->import($arr, true);
}