From 670264d93a362a3b987c6da62511ac49cd07b048 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 2 Jun 2016 21:09:14 +0300 Subject: Show asserts for most errors in resource dbs. --- src/resources/db/emotedb.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/resources/db/emotedb.cpp') 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 -- cgit v1.2.3-60-g2f50