fix: add parent function name in setValue exception (#2777)
* fix: add parent function name in setValue exception * style: fmt
This commit is contained in:
parent
23e4973183
commit
c764a5a648
|
@ -63,8 +63,10 @@ class Application_Model_Preference
|
||||||
$paramMap = [];
|
$paramMap = [];
|
||||||
if ($result > 1) {
|
if ($result > 1) {
|
||||||
// this case should not happen.
|
// this case should not happen.
|
||||||
|
$caller = debug_backtrace()[1]['function'];
|
||||||
|
|
||||||
throw new Exception('Invalid number of results returned. Should be ' .
|
throw new Exception('Invalid number of results returned. Should be ' .
|
||||||
"0 or 1, but is '{$result}' instead");
|
"0 or 1, but is '{$result}' instead, caller={$caller}");
|
||||||
}
|
}
|
||||||
if ($result == 1) {
|
if ($result == 1) {
|
||||||
// result found
|
// result found
|
||||||
|
|
Loading…
Reference in New Issue