summaryrefslogtreecommitdiffstats
path: root/pokemod/MapWildList.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-04-19 18:12:17 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-04-19 18:12:17 +0000
commitfe31331e2807634ae659e372358bac5781de9130 (patch)
tree6b208974e3f141e9b22152526e2d42e967bfd4ec /pokemod/MapWildList.cpp
parent6679f5cffa9d35a23b76605ddfbf3257f882b6ee (diff)
downloadsigen-fe31331e2807634ae659e372358bac5781de9130.tar.gz
sigen-fe31331e2807634ae659e372358bac5781de9130.tar.xz
sigen-fe31331e2807634ae659e372358bac5781de9130.zip
[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
Diffstat (limited to 'pokemod/MapWildList.cpp')
-rw-r--r--pokemod/MapWildList.cpp12
1 files changed, 6 insertions, 6 deletions
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<BoundsException>("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<UnusedException>("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<BoundsException>("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<BoundsException>("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<BoundsException>("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<IndexException>("encounter");
+ warning<IndexException>("encounter");
return m_encounters.at(index);
}