GEOS  3.9.1dev
TopologyException.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2001-2002 Vivid Solutions Inc.
7  * Copyright (C) 2006 Refractions Research Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************/
15 
16 #ifndef GEOS_UTIL_TOPOLOGYEXCEPTION_H
17 #define GEOS_UTIL_TOPOLOGYEXCEPTION_H
18 
19 #include <geos/export.h>
21 #include <geos/geom/Coordinate.h> // to be removed when .inl is available
22 
23 #include <cassert>
24 
25 namespace geos {
26 namespace util { // geos.util
27 
36 public:
38  :
39  GEOSException("TopologyException", "")
40  {}
41 
42  TopologyException(const std::string& msg)
43  :
44  GEOSException("TopologyException", msg)
45  {}
46 
47  TopologyException(const std::string& msg, const geom::Coordinate& newPt)
48  :
49  GEOSException("TopologyException", msg + " at " + newPt.toString()),
50  pt(newPt)
51  {}
52 
53  ~TopologyException() noexcept override {}
56  {
57  return pt;
58  }
59 private:
61 };
62 
63 } // namespace geos::util
64 } // namespace geos
65 
66 
67 #endif // GEOS_UTIL_TOPOLOGYEXCEPTION_H
#define GEOS_DLL
Definition: export.h:28
TopologyException(const std::string &msg, const geom::Coordinate &newPt)
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
geom::Coordinate & getCoordinate()
TopologyException(const std::string &msg)
~TopologyException() noexceptoverride
Basic namespace for all GEOS functionalities.
Base class for all GEOS exceptions.
Definition: GEOSException.h:38
Indicates an invalid or inconsistent topological situation encountered during processing.