From 4b522f40e88e1350434aaa7d77fc60cb7ca36930 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Wed, 30 Jan 2019 20:32:48 -0600 Subject: Make logs more consistent in format and content --- src/categories.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/categories.cpp') diff --git a/src/categories.cpp b/src/categories.cpp index 4d89eff9..9e5fa9f7 100644 --- a/src/categories.cpp +++ b/src/categories.cpp @@ -72,7 +72,7 @@ void CategoryFactory::loadCategories() bool ok = false; int temp = iter->toInt(&ok); if (!ok) { - qCritical("invalid id %s", iter->constData()); + qCritical("invalid category id %s", iter->constData()); } nexusIDs.push_back(temp); } @@ -268,7 +268,7 @@ void CategoryFactory::loadDefaultCategories() int CategoryFactory::getParentID(unsigned int index) const { if (index >= m_Categories.size()) { - throw MyException(QObject::tr("invalid index %1").arg(index)); + throw MyException(QObject::tr("invalid category index: %1").arg(index)); } return m_Categories[index].m_ParentID; @@ -303,7 +303,7 @@ bool CategoryFactory::isDecendantOf(int id, int parentID) const bool CategoryFactory::hasChildren(unsigned int index) const { if (index >= m_Categories.size()) { - throw MyException(QObject::tr("invalid index %1").arg(index)); + throw MyException(QObject::tr("invalid category index: %1").arg(index)); } return m_Categories[index].m_HasChildren; @@ -313,7 +313,7 @@ bool CategoryFactory::hasChildren(unsigned int index) const QString CategoryFactory::getCategoryName(unsigned int index) const { if (index >= m_Categories.size()) { - throw MyException(QObject::tr("invalid index %1").arg(index)); + throw MyException(QObject::tr("invalid category index: %1").arg(index)); } return m_Categories[index].m_Name; @@ -323,7 +323,7 @@ QString CategoryFactory::getCategoryName(unsigned int index) const int CategoryFactory::getCategoryID(unsigned int index) const { if (index >= m_Categories.size()) { - throw MyException(QObject::tr("invalid index %1").arg(index)); + throw MyException(QObject::tr("invalid category index: %1").arg(index)); } return m_Categories[index].m_ID; @@ -334,7 +334,7 @@ int CategoryFactory::getCategoryIndex(int ID) const { std::map::const_iterator iter = m_IDMap.find(ID); if (iter == m_IDMap.end()) { - throw MyException(QObject::tr("invalid category id %1").arg(ID)); + throw MyException(QObject::tr("invalid category id: %1").arg(ID)); } return iter->second; } -- cgit v1.3.1