mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
fhem.pl: better error message for stateFromat errors (Forum #114477)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@22839 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
eafb00c620
commit
9b8a6dee2b
2
fhem.pl
2
fhem.pl
@ -4692,11 +4692,13 @@ evalStateFormat($)
|
||||
$st = $st->{VAL} if(defined($st));
|
||||
|
||||
} elsif($sr =~ m/^{(.*)}$/s) {
|
||||
$cmdFromAnalyze = $1;
|
||||
$st = eval $1;
|
||||
if($@) {
|
||||
$st = "Error evaluating $name stateFormat: $@";
|
||||
Log 1, $st;
|
||||
}
|
||||
$cmdFromAnalyze = undef;
|
||||
|
||||
} else {
|
||||
# Substitute reading names with their values, leave the rest untouched.
|
||||
|
Loading…
x
Reference in New Issue
Block a user