2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-17 05:16:02 +00:00

added: error handling for malformatted XML files from GDS

git-svn-id: https://svn.fhem.de/fhem/trunk@4145 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2013-11-03 19:23:15 +00:00
parent 05c38abcae
commit 2ebbd11e5e

View File

@ -449,7 +449,10 @@ sub buildCAPList(@){
my $xml = new XML::Simple;
$alertsXml = undef;
$alertsXml = $xml->XMLin($tempDir.$name.'_alerts', KeyAttr => {}, ForceArray => [ 'info', 'eventCode', 'area', 'geocode' ]);
eval {
$alertsXml = $xml->XMLin($tempDir.$name.'_alerts', KeyAttr => {}, ForceArray => [ 'info', 'eventCode', 'area', 'geocode' ]);
};
return (undef,undef) if(!defined($alertsXml));
my $info = 0;
my $area = 0;
my $record = 0;
@ -1077,6 +1080,8 @@ sub initDropdownLists($){
# 2013-08-13 fixed some minor bugs to prevent annoying console messages
# added support for fhem installtions running on windows-based systems
#
# 2013-11-03 added error handling for malformed XML files from GDS
#
####################################################################################################
#
# Further informations