GEOS 3.15.0dev
TopologyException.h
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#pragma once
17
18#include <geos/export.h>
19#include <geos/util/GEOSException.h>
20#include <geos/geom/Coordinate.h> // to be removed when .inl is available
21
22#include <cassert>
23
24namespace geos {
25namespace util { // geos.util
26
34class GEOS_DLL TopologyException: public GEOSException {
35public:
37 :
38 GEOSException("TopologyException", "")
39 {}
40
41 TopologyException(const std::string& msg)
42 :
43 GEOSException("TopologyException", msg)
44 {}
45
46 TopologyException(const std::string& msg, const geom::CoordinateXY& newPt)
47 :
48 GEOSException("TopologyException", msg + " at " + newPt.toString()),
49 pt(newPt)
50 {}
51
52 TopologyException(const std::string& msg, const geom::Coordinate& newPt)
53 :
54 GEOSException("TopologyException", msg + " at " + newPt.toString()),
55 pt(newPt)
56 {}
57
58 ~TopologyException() noexcept override {}
60 getCoordinate()
61 {
62 return pt;
63 }
64private:
66};
67
68} // namespace geos::util
69} // namespace geos
70
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:220
Base class for all GEOS exceptions.
Definition GEOSException.h:37
Indicates an invalid or inconsistent topological situation encountered during processing.
Definition TopologyException.h:34
Basic namespace for all GEOS functionalities.
Definition geos.h:38