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/MapTrainer.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/MapTrainer.cpp')
| -rw-r--r-- | pokemod/MapTrainer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pokemod/MapTrainer.cpp b/pokemod/MapTrainer.cpp index e64d6c16..217b8d2d 100644 --- a/pokemod/MapTrainer.cpp +++ b/pokemod/MapTrainer.cpp @@ -155,7 +155,7 @@ void MapTrainer::setName(const QString& name) void MapTrainer::setTrainerClass(const int trainerClass) throw(BoundsException) { if (pokemod()->trainerIndex(trainerClass) == INT_MAX) - throw(BoundsException(className(), "trainerClass")); + error<BoundsException>("trainerClass"); m_trainerClass = trainerClass; } @@ -172,14 +172,14 @@ void MapTrainer::setSight(const int sight) void MapTrainer::setDirection(const int direction) throw(BoundsException) { if (Pokemod::D_End_None <= direction) - throw(BoundsException(className(), "direction")); + error<BoundsException>("direction"); m_direction = direction; } void MapTrainer::setNumFight(const int numFight) throw(BoundsException) { if (!numFight || (pokemod()->rules()->maxFight() < numFight)) - throw(BoundsException(className(), "numFight")); + error<BoundsException>("numFight"); m_numFight = numFight; } @@ -191,14 +191,14 @@ void MapTrainer::setAppearFlag(const Flag& appearFlag) void MapTrainer::setDialog(const int dialog) throw(BoundsException) { if (pokemod()->dialogIndex(dialog) == INT_MAX) - throw(BoundsException(className(), "dialog")); + error<BoundsException>("dialog"); m_dialog = dialog; } void MapTrainer::setLeadTeamMember(const int leadMember) throw(BoundsException) { if (teamMemberCount() <= leadMember) - throw(BoundsException(className(), "leadTeamMember")); + error<BoundsException>("leadTeamMember"); m_leadTeamMember = leadMember; } @@ -250,7 +250,7 @@ int MapTrainer::leadTeamMember() const const MapTrainerTeamMember* MapTrainer::teamMember(const int index) const throw(IndexException) { if (teamMemberCount() <= index) - error<IndexException>("team member"); + warning<IndexException>("team member"); return m_teamMember.at(index); } |
