From 4c47844ad973fe264b362f47b11241068470285d Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Wed, 8 Oct 2014 08:30:15 +0000 Subject: [PATCH] fhem.pl: Add more info to the WARN sub. git-svn-id: https://svn.fhem.de/fhem/trunk@6707 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 2391476da..0586c2b54 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -213,6 +213,7 @@ use vars qw(%readyfnlist); # devices which want a "readyfn" use vars qw(%selectlist); # devices which want a "select" use vars qw(%value); # Current values, see commandref.html use vars qw($lastDefChange); # number of last def/attr change +use vars qw($cmdFromAnalyze); # used by the warnings-sub my $AttrList = "verbose:0,1,2,3,4,5 room group comment alias ". "eventMap userReadings"; @@ -891,8 +892,10 @@ AnalyzePerlCommand($$) $evalSpecials = undef; } + $cmdFromAnalyze = $cmd; my $ret = eval $cmd; $ret = $@ if($@); + $cmdFromAnalyze = undef; return $ret; } @@ -2597,6 +2600,7 @@ SignalHandling() $inWarnSub = 1; chomp($msg); Log 1, "PERL WARNING: $msg"; + Log 3, "eval: $cmdFromAnalyze" if($cmdFromAnalyze && $msg =~ m/\(eval /); stacktrace() if($attr{global}{verbose} >= 3 && $msg !~ m/ redefined at /); $inWarnSub = 0; };