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/MapTrainerTeamMember.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/MapTrainerTeamMember.cpp')
| -rw-r--r-- | pokemod/MapTrainerTeamMember.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pokemod/MapTrainerTeamMember.cpp b/pokemod/MapTrainerTeamMember.cpp index 2948faa7..1338f7b8 100644 --- a/pokemod/MapTrainerTeamMember.cpp +++ b/pokemod/MapTrainerTeamMember.cpp @@ -121,21 +121,21 @@ QDomElement MapTrainerTeamMember::save() const void MapTrainerTeamMember::setSpecies(const int species) throw(BoundsException) { if (pokemod()->speciesIndex(species) == INT_MAX) - throw(BoundsException(className(), "species")); + error<BoundsException>("species"); m_species = species; } void MapTrainerTeamMember::setLevel(const int level) throw(BoundsException) { if (pokemod()->rules()->maxLevel() < level) - throw(BoundsException(className(), "level")); + error<BoundsException>("level"); m_level = level; } void MapTrainerTeamMember::setItem(const int item, const bool state) throw(BoundsException) { if (pokemod()->itemIndex(item) == INT_MAX) - throw(BoundsException(className(), "item")); + error<BoundsException>("item"); if (state) { if (!m_items.contains(item)) @@ -148,7 +148,7 @@ void MapTrainerTeamMember::setItem(const int item, const bool state) throw(Bound void MapTrainerTeamMember::setNature(const int nature) throw(BoundsException) { if (!pokemod()->rules()->natureAllowed() || (pokemod()->natureIndex(nature) == INT_MAX)) - throw(BoundsException(className(), "nature")); + error<BoundsException>("nature"); m_nature = nature; } |
