00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_UTIL_TOPOLOGYEXCEPTION_H
00017 #define GEOS_UTIL_TOPOLOGYEXCEPTION_H
00018
00019 #include <geos/export.h>
00020 #include <geos/util/GEOSException.h>
00021 #include <geos/geom/Coordinate.h>
00022
00023 #include <cassert>
00024
00025 namespace geos {
00026 namespace util {
00027
00035 class GEOS_DLL TopologyException: public GEOSException {
00036 public:
00037 TopologyException()
00038 :
00039 GEOSException("TopologyException", "")
00040 {}
00041
00042 TopologyException(const std::string& msg)
00043 :
00044 GEOSException("TopologyException", msg)
00045 {}
00046
00047 TopologyException(const std::string& msg, const geom::Coordinate& newPt)
00048 :
00049 GEOSException("TopologyException", msg + " at " + newPt.toString()),
00050 pt(newPt)
00051 {}
00052
00053 ~TopologyException() throw() {}
00054 geom::Coordinate& getCoordinate() { return pt; }
00055 private:
00056 geom::Coordinate pt;
00057 };
00058
00059 }
00060 }
00061
00062
00063 #endif // GEOS_UTIL_TOPOLOGYEXCEPTION_H