00001 /********************************************************************** 00002 * $Id: TopologyException.h 1820 2006-09-06 16:54:23Z mloskot $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 00007 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00008 * Copyright (C) 2006 Refractions Research Inc. 00009 * 00010 * This is free software; you can redistribute and/or modify it under 00011 * the terms of the GNU Lesser General Public Licence as published 00012 * by the Free Software Foundation. 00013 * See the COPYING file for more information. 00014 * 00015 **********************************************************************/ 00016 00017 #ifndef GEOS_UTIL_TOPOLOGYEXCEPTION_H 00018 #define GEOS_UTIL_TOPOLOGYEXCEPTION_H 00019 00020 #include <geos/util/GEOSException.h> 00021 #include <geos/geom/Coordinate.h> // to be removed when .inl is available 00022 00023 #include <cassert> 00024 00025 namespace geos { 00026 namespace util { // geos.util 00027 00035 class 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+" "+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 } // namespace geos::util 00060 } // namespace geos 00061 00062 00063 #endif // GEOS_UTIL_TOPOLOGYEXCEPTION_H 00064 00065 /********************************************************************** 00066 * $Log$ 00067 * Revision 1.3 2006/03/23 15:10:29 strk 00068 * Dropped by-pointer TopologyException constructor, various small cleanups 00069 * 00070 * Revision 1.2 2006/03/22 11:19:06 strk 00071 * opPolygonize.h headers split. 00072 * 00073 * Revision 1.1 2006/03/09 16:46:49 strk 00074 * geos::geom namespace definition, first pass at headers split 00075 * 00076 **********************************************************************/