diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-05-11 19:23:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-05-11 19:23:27 +0300 |
commit | dbcbc901992ec3a54ec3a1730029b25d94d679b1 (patch) | |
tree | e920682021dea0a2a93e6a6c0365dacd272437cc /src/utils/xml | |
parent | b330124c19e089cdaf7c91a9103f8bce14d8479e (diff) | |
download | plus-dbcbc901992ec3a54ec3a1730029b25d94d679b1.tar.gz plus-dbcbc901992ec3a54ec3a1730029b25d94d679b1.tar.bz2 plus-dbcbc901992ec3a54ec3a1730029b25d94d679b1.tar.xz plus-dbcbc901992ec3a54ec3a1730029b25d94d679b1.zip |
Add reportAlways macroses in xml load errors.
Diffstat (limited to 'src/utils/xml')
-rw-r--r-- | src/utils/xml/libxml.cpp | 7 | ||||
-rw-r--r-- | src/utils/xml/pugixml.cpp | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/utils/xml/libxml.cpp b/src/utils/xml/libxml.cpp index 46d184067..b03a32211 100644 --- a/src/utils/xml/libxml.cpp +++ b/src/utils/xml/libxml.cpp @@ -26,6 +26,7 @@ #include "logger.h" +#include "utils/checkutils.h" #include "utils/fuzzer.h" #include "utils/physfstools.h" #include "utils/stringutils.h" @@ -112,6 +113,7 @@ namespace XML if (size < 0) { logger->log("Error loading XML file %s", filename.c_str()); + reportAlways("Error loading XML file %s", filename.c_str()); } else { @@ -124,6 +126,7 @@ namespace XML else { logger->log("Error loading XML file %s", filename.c_str()); + reportAlways("Error loading XML file %s", filename.c_str()); } } @@ -133,11 +136,15 @@ namespace XML free(data); if (!mDoc) + { logger->log("Error parsing XML file %s", filename.c_str()); + reportAlways("Error parsing XML file %s", filename.c_str()); + } } else if (skipError == SkipError_false) { logger->log("Error loading %s", filename.c_str()); + reportAlways("Error loading XML file %s", filename.c_str()); } mIsValid = valid; BLOCK_END("XML::Document::Document") diff --git a/src/utils/xml/pugixml.cpp b/src/utils/xml/pugixml.cpp index 0f01c7f10..62aa68cba 100644 --- a/src/utils/xml/pugixml.cpp +++ b/src/utils/xml/pugixml.cpp @@ -26,6 +26,7 @@ #include "logger.h" +#include "utils/checkutils.h" #include "utils/delete2.h" #include "utils/fuzzer.h" #include "utils/physfstools.h" @@ -88,6 +89,8 @@ namespace XML if (size < 0) { logger->log("Error loading XML file %s", filename.c_str()); + reportAlways("Error loading XML file %s", + filename.c_str()); } else { @@ -100,6 +103,7 @@ namespace XML else { logger->log("Error loading XML file %s", filename.c_str()); + reportAlways("Error loading XML file %s", filename.c_str()); } } @@ -126,6 +130,7 @@ namespace XML else if (skipError == SkipError_false) { logger->log("Error loading %s", filename.c_str()); + reportAlways("Error loading %s", filename.c_str()); } mIsValid = valid; BLOCK_END("XML::Document::Document") |