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/Item.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/Item.cpp')
| -rw-r--r-- | pokemod/Item.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pokemod/Item.cpp b/pokemod/Item.cpp index afd4bd67..e49e9b17 100644 --- a/pokemod/Item.cpp +++ b/pokemod/Item.cpp @@ -133,14 +133,14 @@ void Item::setSellable(const bool sellable) void Item::setType(const int type) throw(BoundsException) { if (pokemod()->itemTypeIndex(type) == INT_MAX) - throw(BoundsException(className(), "type")); + error<BoundsException>("type"); m_type = type; } void Item::setPrice(const int price) throw(BoundsException) { if (pokemod()->rules()->maxMoney() < price) - throw(BoundsException(className(), "price")); + error<BoundsException>("price"); m_price = price; } @@ -177,7 +177,7 @@ QString Item::description() const const ItemEffect* Item::effect(const int index) const throw(IndexException) { if (effectCount() <= index) - error<IndexException>("effect"); + warning<IndexException>("effect"); return m_effects.at(index); } |
