From fe31331e2807634ae659e372358bac5781de9130 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 19 Apr 2008 18:12:17 +0000 Subject: [FIX] IndexException is more explicit [FIX] Added SizeException for image validation [FIX] QPixmaps are now verified [FIX] Classes now use error and warning rather than throwing [FIX] Deleted Object.cpp git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@100 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemod/MapWildList.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pokemod/MapWildList.cpp') diff --git a/pokemod/MapWildList.cpp b/pokemod/MapWildList.cpp index 07cd46ec..8679410f 100644 --- a/pokemod/MapWildList.cpp +++ b/pokemod/MapWildList.cpp @@ -161,7 +161,7 @@ QDomElement MapWildList::save() const void MapWildList::setControl(const int control) throw(BoundsException) { if (End <= control) - throw(BoundsException(className(), "control")); + error("control"); m_control = control; m_value = INT_MAX; } @@ -169,7 +169,7 @@ void MapWildList::setControl(const int control) throw(BoundsException) void MapWildList::setValue(const int value) throw(Exception) { if (m_control != Fishing) - throw(UnusedException(className(), "value")); + error("value"); bool ok = false; for (int i = 0; (i < pokemod()->itemCount()) && !ok; ++i) { @@ -181,14 +181,14 @@ void MapWildList::setValue(const int value) throw(Exception) } } if (!ok) - throw(BoundsException(className(), "value")); + error("value"); m_value = value; } void MapWildList::setTime(const int time, const bool state) throw(BoundsException) { if (pokemod()->timeIndex(time) == INT_MAX) - throw(BoundsException(className(), "time")); + error("time"); if (state) { if (!m_times.contains(time)) @@ -213,7 +213,7 @@ void MapWildList::setScope(const int scope) throw(BoundsException) } } if (!ok) - throw(BoundsException(className(), "scope")); + error("scope"); } m_scope = scope; } @@ -241,7 +241,7 @@ int MapWildList::scope() const const MapWildListEncounter* MapWildList::encounter(const int index) const throw(IndexException) { if (encounterCount() <= index) - error("encounter"); + warning("encounter"); return m_encounters.at(index); } -- cgit