Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:23

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
0004 // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
0005 // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
0006 
0007 // This file was modified by Oracle on 2015, 2017.
0008 // Modifications copyright (c) 2015-2017 Oracle and/or its affiliates.
0009 
0010 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0011 
0012 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
0013 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
0014 
0015 // Use, modification and distribution is subject to the Boost Software License,
0016 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0017 // http://www.boost.org/LICENSE_1_0.txt)
0018 
0019 #ifndef BOOST_GEOMETRY_CORE_EXCEPTION_HPP
0020 #define BOOST_GEOMETRY_CORE_EXCEPTION_HPP
0021 
0022 #include <exception>
0023 
0024 namespace boost { namespace geometry
0025 {
0026 
0027 /*!
0028 \brief Base exception class for Boost.Geometry algorithms
0029 \ingroup core
0030 \details This class is never thrown. All exceptions thrown in Boost.Geometry
0031     are derived from exception, so it might be convenient to catch it.
0032 */
0033 class exception : public std::exception
0034 {
0035 public:
0036     char const* what() const noexcept override
0037     {
0038         return "Boost.Geometry exception";
0039     }
0040 };
0041 
0042 /*!
0043 \brief Invalid Input Exception
0044 \ingroup core
0045 \details The invalid_input_exception is thrown if an invalid attribute
0046          is passed into a function, e.g. a DE-9IM mask string code containing
0047          invalid characters passed into a de9im::mask constructor.
0048  */
0049 class invalid_input_exception : public geometry::exception
0050 {
0051 public:
0052 
0053     inline invalid_input_exception() {}
0054 
0055     char const* what() const noexcept override
0056     {
0057         return "Boost.Geometry Invalid-Input exception";
0058     }
0059 };
0060 
0061 /*!
0062 \brief Empty Input Exception
0063 \ingroup core
0064 \details The empty_input_exception is thrown if free functions, e.g. distance,
0065     are called with empty geometries, e.g. a linestring
0066     without points, a polygon without points, an empty multi-geometry.
0067 \qbk{
0068 [heading See also]
0069 \* [link geometry.reference.algorithms.area the area function]
0070 \* [link geometry.reference.algorithms.distance the distance function]
0071 \* [link geometry.reference.algorithms.length the length function]
0072 }
0073  */
0074 class empty_input_exception : public geometry::invalid_input_exception
0075 {
0076 public:
0077 
0078     inline empty_input_exception() {}
0079 
0080     virtual char const* what() const noexcept
0081     {
0082         return "Boost.Geometry Empty-Input exception";
0083     }
0084 };
0085 
0086 /*!
0087 \brief Invalid Output Exception
0088 \ingroup core
0089 \details The invalid_output_exception is thrown if valid output cannot be
0090          generated by a function even if arguments are valid, e.g. union of
0091          geographic polygons covering more than half of the area of the globe.
0092  */
0093 class invalid_output_exception : public geometry::exception
0094 {
0095 public:
0096 
0097     inline invalid_output_exception() {}
0098 
0099     char const* what() const noexcept override
0100     {
0101         return "Boost.Geometry Invalid-Output exception";
0102     }
0103 };
0104 
0105 
0106 }} // namespace boost::geometry
0107 
0108 #endif // BOOST_GEOMETRY_CORE_EXCEPTION_HPP