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/MoveEffect.cpp | |
| parent | 6679f5cffa9d35a23b76605ddfbf3257f882b6ee (diff) | |
| download | sigen-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/MoveEffect.cpp')
| -rw-r--r-- | pokemod/MoveEffect.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pokemod/MoveEffect.cpp b/pokemod/MoveEffect.cpp index e267337b..8633b549 100644 --- a/pokemod/MoveEffect.cpp +++ b/pokemod/MoveEffect.cpp @@ -91,7 +91,7 @@ void MoveEffect::setChance(const Fraction& chance) throw(Exception) void MoveEffect::setEffect(const int effect) throw(BoundsException) { if (E_End <= effect) - throw(BoundsException(className(), "effect")); + error<BoundsException>("effect"); m_effect = effect; m_value1 = INT_MAX; m_value2 = INT_MAX; @@ -105,28 +105,28 @@ void MoveEffect::setValue1(const int value1) throw(Exception) { case E_Damage: if (D_End <= value1) - throw(BoundsException(className(), "value1")); + error<BoundsException>("value1"); break; case E_Status: case E_NeedStatus: if (Pokemod::STS_End <= value1) - throw(BoundsException(className(), "value1")); + error<BoundsException>("value1"); throw; case E_Stat: if (Pokemod::ST_End_Battle <= value1) - throw(BoundsException(className(), "value1")); + error<BoundsException>("value1"); break; case E_Counter: case E_Shield: if (MT_End <= value1) - throw(BoundsException(className(), "value1")); + error<BoundsException>("value1"); break; case E_Recoil: if (R_End <= value1) - throw(BoundsException(className(), "value1")); + error<BoundsException>("value1"); break; default: - throw(BoundsException(className(), "value1")); + error<BoundsException>("value1"); break; } m_value1 = value1; @@ -138,10 +138,10 @@ void MoveEffect::setValue2(const int value2) throw(Exception) { case E_Damage: if ((D_Level <= m_value1) || !value2) - throw(BoundsException(className(), "value2")); + error<BoundsException>("value2"); break; default: - throw(BoundsException(className(), "value2")); + error<BoundsException>("value2"); break; } m_value2 = value2; |
