GEOS 3.11.1
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::Coordinate& newPt)
47 :
48 GEOSException("TopologyException", msg + " at " + newPt.toString()),
49 pt(newPt)
50 {}
51
52 ~TopologyException() noexcept override {}
54 getCoordinate()
55 {
56 return pt;
57 }
58private:
60};
61
62} // namespace geos::util
63} // namespace geos
64
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
std::string toString() const
Returns a string of the form (x,y,z) .
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:39