diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-04-19 18:12:17 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-04-19 18:12:17 +0000 |
| commit | fe31331e2807634ae659e372358bac5781de9130 (patch) | |
| tree | 6b208974e3f141e9b22152526e2d42e967bfd4ec /pokemod/Nature.cpp | |
| parent | 6679f5cffa9d35a23b76605ddfbf3257f882b6ee (diff) | |
[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/Nature.cpp')
| -rw-r--r-- | pokemod/Nature.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pokemod/Nature.cpp b/pokemod/Nature.cpp index 7f84286e..85fd45ea 100644 --- a/pokemod/Nature.cpp +++ b/pokemod/Nature.cpp @@ -90,14 +90,14 @@ void Nature::setName(const QString& name) void Nature::setStat(const int stat, const Fraction& multiplier) throw(Exception) { if ((pokemod()->rules()->specialSplit() ? Pokemod::ST_End_GSC : Pokemod::ST_End_RBY) <= stat) - throw(BoundsException(className(), "stat")); + error<BoundsException>("stat"); m_stat[stat] = multiplier; } void Nature::setWeight(const int weight) throw(BoundsException) { if (!weight) - throw(BoundsException(className(), "weight")); + error<BoundsException>("weight"); m_weight = weight; } @@ -109,7 +109,7 @@ QString Nature::name() const Fraction Nature::stat(const int stat) const throw(BoundsException) { if ((pokemod()->rules()->specialSplit() ? Pokemod::ST_End_GSC : Pokemod::ST_End_RBY) <= stat) - throw(BoundsException(className(), "stat")); + warning<BoundsException>("stat"); return m_stat[stat]; } |
