From fe31331e2807634ae659e372358bac5781de9130 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 19 Apr 2008 18:12:17 +0000 Subject: [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 --- pokemod/Map.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'pokemod/Map.cpp') diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp index 7b577e14..5f1a0fd0 100644 --- a/pokemod/Map.cpp +++ b/pokemod/Map.cpp @@ -218,14 +218,14 @@ void Map::setName(const QString& name) void Map::setFlyWarp(const int warp) throw(BoundsException) { if ((warp != INT_MAX) && (warpIndex(warp) == INT_MAX)) - throw(BoundsException(className(), "warp")); + error("warp"); m_flyWarp = warp; } void Map::setType(const int type) throw(BoundsException) { if (End <= type) - throw(BoundsException(className(), "type")); + error("type"); m_type = type; } @@ -247,7 +247,7 @@ int Map::type() const void Map::setTile(int x, int y, int id) throw(BoundsException) { if (pokemod()->tileIndex(id) == INT_MAX) - throw(BoundsException(className(), "tile")); + error("tile"); m_tile(x, y) = id; } @@ -309,7 +309,7 @@ int Map::height() const const MapEffect* Map::effect(const int index) const throw(IndexException) { if (effectCount() <= index) - error("effect"); + warning("effect"); return m_effects.at(index); } @@ -387,7 +387,7 @@ int Map::newEffectId() const const MapTrainer* Map::trainer(const int index) const throw(IndexException) { if (trainerCount() <= index) - error("trainer"); + warning("trainer"); return m_trainers.at(index); } @@ -465,7 +465,7 @@ int Map::newTrainerId() const const MapWarp* Map::warp(const int index) const throw(IndexException) { if (warpCount() <= index) - error("warp"); + warning("warp"); return m_warps.at(index); } @@ -543,7 +543,7 @@ int Map::newWarpId() const const MapWildList* Map::wildList(const int index) const throw(IndexException) { if (wildListCount() <= index) - error("wild list"); + warning("wild list"); return m_wildLists.at(index); } -- cgit