Chris@16
|
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
|
Chris@16
|
2
|
Chris@16
|
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
Chris@16
|
4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
Chris@16
|
5 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
Chris@16
|
6
|
Chris@16
|
7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
Chris@16
|
8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
Chris@16
|
9
|
Chris@16
|
10 // Use, modification and distribution is subject to the Boost Software License,
|
Chris@16
|
11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
12 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
13
|
Chris@16
|
14 #ifndef BOOST_GEOMETRY_CORE_EXCEPTION_HPP
|
Chris@16
|
15 #define BOOST_GEOMETRY_CORE_EXCEPTION_HPP
|
Chris@16
|
16
|
Chris@16
|
17 #include <exception>
|
Chris@16
|
18
|
Chris@16
|
19 namespace boost { namespace geometry
|
Chris@16
|
20 {
|
Chris@16
|
21
|
Chris@16
|
22 /*!
|
Chris@16
|
23 \brief Base exception class for Boost.Geometry algorithms
|
Chris@16
|
24 \ingroup core
|
Chris@16
|
25 \details This class is never thrown. All exceptions thrown in Boost.Geometry
|
Chris@16
|
26 are derived from exception, so it might be convenient to catch it.
|
Chris@16
|
27 */
|
Chris@16
|
28 class exception : public std::exception
|
Chris@16
|
29 {};
|
Chris@16
|
30
|
Chris@16
|
31
|
Chris@16
|
32 /*!
|
Chris@16
|
33 \brief Empty Input Exception
|
Chris@16
|
34 \ingroup core
|
Chris@16
|
35 \details The empty_input_exception is thrown if free functions, e.g. distance,
|
Chris@16
|
36 are called with empty geometries, e.g. a linestring
|
Chris@16
|
37 without points, a polygon without points, an empty multi-geometry.
|
Chris@16
|
38 \qbk{
|
Chris@16
|
39 [heading See also]
|
Chris@16
|
40 \* [link geometry.reference.algorithms.area the area function]
|
Chris@16
|
41 \* [link geometry.reference.algorithms.distance the distance function]
|
Chris@16
|
42 \* [link geometry.reference.algorithms.length the length function]
|
Chris@16
|
43 }
|
Chris@16
|
44 */
|
Chris@16
|
45 class empty_input_exception : public geometry::exception
|
Chris@16
|
46 {
|
Chris@16
|
47 public:
|
Chris@16
|
48
|
Chris@16
|
49 inline empty_input_exception() {}
|
Chris@16
|
50
|
Chris@16
|
51 virtual char const* what() const throw()
|
Chris@16
|
52 {
|
Chris@16
|
53 return "Boost.Geometry Empty-Input exception";
|
Chris@16
|
54 }
|
Chris@16
|
55 };
|
Chris@16
|
56
|
Chris@16
|
57
|
Chris@16
|
58 }} // namespace boost::geometry
|
Chris@16
|
59
|
Chris@16
|
60 #endif // BOOST_GEOMETRY_CORE_EXCEPTION_HPP
|