Chris@16: // Boost.Geometry (aka GGL, Generic Geometry Library) Chris@16: Chris@16: // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. Chris@16: // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. Chris@16: // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. Chris@16: Chris@16: // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library Chris@16: // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. Chris@16: Chris@16: // Use, modification and distribution is subject to the Boost Software License, Chris@16: // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #ifndef BOOST_GEOMETRY_CORE_EXCEPTION_HPP Chris@16: #define BOOST_GEOMETRY_CORE_EXCEPTION_HPP Chris@16: Chris@16: #include Chris@16: Chris@16: namespace boost { namespace geometry Chris@16: { Chris@16: Chris@16: /*! Chris@16: \brief Base exception class for Boost.Geometry algorithms Chris@16: \ingroup core Chris@16: \details This class is never thrown. All exceptions thrown in Boost.Geometry Chris@16: are derived from exception, so it might be convenient to catch it. Chris@16: */ Chris@16: class exception : public std::exception Chris@16: {}; Chris@16: Chris@16: Chris@16: /*! Chris@16: \brief Empty Input Exception Chris@16: \ingroup core Chris@16: \details The empty_input_exception is thrown if free functions, e.g. distance, Chris@16: are called with empty geometries, e.g. a linestring Chris@16: without points, a polygon without points, an empty multi-geometry. Chris@16: \qbk{ Chris@16: [heading See also] Chris@16: \* [link geometry.reference.algorithms.area the area function] Chris@16: \* [link geometry.reference.algorithms.distance the distance function] Chris@16: \* [link geometry.reference.algorithms.length the length function] Chris@16: } Chris@16: */ Chris@16: class empty_input_exception : public geometry::exception Chris@16: { Chris@16: public: Chris@16: Chris@16: inline empty_input_exception() {} Chris@16: Chris@16: virtual char const* what() const throw() Chris@16: { Chris@16: return "Boost.Geometry Empty-Input exception"; Chris@16: } Chris@16: }; Chris@16: Chris@16: Chris@16: }} // namespace boost::geometry Chris@16: Chris@16: #endif // BOOST_GEOMETRY_CORE_EXCEPTION_HPP