diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/checkutils.h | 7 | ||||
-rw-r--r-- | src/utils/xml/libxml.cpp | 7 | ||||
-rw-r--r-- | src/utils/xml/pugixml.cpp | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/utils/checkutils.h b/src/utils/checkutils.h index b67c5d566..0423a0925 100644 --- a/src/utils/checkutils.h +++ b/src/utils/checkutils.h @@ -171,7 +171,12 @@ void reportStack(); #define reportFalseReal(val) (val) #define reportTrueReal(val) (val) -#define reportAlwaysReal(...) ; +#define reportAlwaysReal(...) \ + { \ + logger->log("Error:"); \ + logger->log( \ + __VA_ARGS__); \ + } #define returnFalseVReal(val) \ if (!val) \ diff --git a/src/utils/xml/libxml.cpp b/src/utils/xml/libxml.cpp index b03a32211..247d5cc9d 100644 --- a/src/utils/xml/libxml.cpp +++ b/src/utils/xml/libxml.cpp @@ -112,8 +112,8 @@ namespace XML size = CAST_S32(file.tellg()); if (size < 0) { - logger->log("Error loading XML file %s", filename.c_str()); - reportAlways("Error loading XML file %s", filename.c_str()); + reportAlways("Error loading XML file %s", + filename.c_str()); } else { @@ -125,7 +125,6 @@ namespace XML } else { - logger->log("Error loading XML file %s", filename.c_str()); reportAlways("Error loading XML file %s", filename.c_str()); } } @@ -137,13 +136,11 @@ namespace XML 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; diff --git a/src/utils/xml/pugixml.cpp b/src/utils/xml/pugixml.cpp index 62aa68cba..fe1564f2b 100644 --- a/src/utils/xml/pugixml.cpp +++ b/src/utils/xml/pugixml.cpp @@ -88,7 +88,6 @@ namespace XML size = CAST_S32(file.tellg()); if (size < 0) { - logger->log("Error loading XML file %s", filename.c_str()); reportAlways("Error loading XML file %s", filename.c_str()); } @@ -102,8 +101,8 @@ namespace XML } else { - logger->log("Error loading XML file %s", filename.c_str()); - reportAlways("Error loading XML file %s", filename.c_str()); + reportAlways("Error loading XML file %s", + filename.c_str()); } } @@ -129,7 +128,6 @@ namespace XML } else if (skipError == SkipError_false) { - logger->log("Error loading %s", filename.c_str()); reportAlways("Error loading %s", filename.c_str()); } mIsValid = valid; |