diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-02 21:09:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-02 21:09:14 +0300 |
commit | 670264d93a362a3b987c6da62511ac49cd07b048 (patch) | |
tree | 8e7470b6f419965a4fe4464fe06dd9c117edce5a /src/resources/db/emotedb.cpp | |
parent | 6e577446c8b561a4ce8fd2d74f43c36210e8a571 (diff) | |
download | mv-670264d93a362a3b987c6da62511ac49cd07b048.tar.gz mv-670264d93a362a3b987c6da62511ac49cd07b048.tar.bz2 mv-670264d93a362a3b987c6da62511ac49cd07b048.tar.xz mv-670264d93a362a3b987c6da62511ac49cd07b048.zip |
Show asserts for most errors in resource dbs.
Diffstat (limited to 'src/resources/db/emotedb.cpp')
-rw-r--r-- | src/resources/db/emotedb.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/resources/db/emotedb.cpp b/src/resources/db/emotedb.cpp index 40d59d780..77176fea3 100644 --- a/src/resources/db/emotedb.cpp +++ b/src/resources/db/emotedb.cpp @@ -26,6 +26,8 @@ #include "configuration.h" +#include "utils/checkutils.h" + #include "resources/beingcommon.h" #include "resources/emoteinfo.h" #include "resources/emotesprite.h" @@ -103,7 +105,7 @@ void EmoteDB::loadXmlFile(const std::string &fileName, if (id == -1) { - logger->log("Emote Database: Emote with missing ID in %s!", + reportAlways("Emote Database: Emote with missing ID in %s!", paths.getStringValue("emotesFile").c_str()); continue; } @@ -176,8 +178,8 @@ void EmoteDB::loadSpecialXmlFile(const std::string &fileName, const int id = XML::getProperty(emoteNode, "id", -1); if (id == -1) { - logger->log1("Emote Database: Emote with missing ID in " - "manaplus_emotes.xml!"); + reportAlways("Emote Database: Emote with missing ID in " + "manaplus_emotes.xml!"); continue; } const int altId = XML::getProperty(emoteNode, "altid", -1); @@ -259,7 +261,8 @@ const EmoteInfo *EmoteDB::get(const int id, const bool allowNull) { if (allowNull) return nullptr; - logger->log("EmoteDB: Warning, unknown emote ID %d requested", id); + reportAlways("EmoteDB: Warning, unknown emote ID %d requested", + id); return &mUnknown; } else @@ -280,7 +283,8 @@ const EmoteInfo *EmoteDB::get2(int id, const bool allowNull) { if (allowNull) return nullptr; - logger->log("EmoteDB: Warning, unknown emote ID %d requested", id); + reportAlways("EmoteDB: Warning, unknown emote ID %d requested", + id); return &mUnknown; } else |