GEOS
3.8.1
include
geos
util
GEOSException.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
#ifndef GEOS_UTIL_GEOSEXCEPTION_H
17
#define GEOS_UTIL_GEOSEXCEPTION_H
18
19
#include <geos/export.h>
20
#include <stdexcept>
21
#include <string>
22
23
#ifdef _MSC_VER
24
#pragma warning(push)
25
#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
26
#pragma warning(disable: 4275) // warning C4275: non-DLL-interface std::exception used as base for DLL-interface GEOSException
27
#endif
28
29
namespace
geos
{
30
namespace
util {
// geos.util
31
38
class
GEOS_DLL GEOSException:
public
std::runtime_error {
39
40
public
:
41
42
GEOSException()
43
:
44
std::runtime_error(
"Unknown error"
)
45
{}
46
47
GEOSException(std::string
const
& msg)
48
:
49
std::runtime_error(msg)
50
{}
51
52
GEOSException(std::string
const
& name, std::string
const
& msg)
53
:
54
std::runtime_error(name +
": "
+ msg)
55
{}
56
57
};
58
59
}
// namespace geos.util
60
}
// namespace geos
61
62
#ifdef _MSC_VER
63
#pragma warning(pop)
64
#endif
65
66
#endif // GEOS_UTIL_GEOSEXCEPTION_H
geos
Basic namespace for all GEOS functionalities.
Definition:
IndexedNestedRingTester.h:25
Generated by
1.8.18