summaryrefslogtreecommitdiff
path: root/boost/geometry/algorithms/detail/throw_on_empty_input.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/algorithms/detail/throw_on_empty_input.hpp')
-rw-r--r--boost/geometry/algorithms/detail/throw_on_empty_input.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/boost/geometry/algorithms/detail/throw_on_empty_input.hpp b/boost/geometry/algorithms/detail/throw_on_empty_input.hpp
index 2f82e1a8bd..3d45a46d16 100644
--- a/boost/geometry/algorithms/detail/throw_on_empty_input.hpp
+++ b/boost/geometry/algorithms/detail/throw_on_empty_input.hpp
@@ -3,6 +3,7 @@
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
// This file was modified by Oracle on 2015.
// Modifications copyright (c) 2015, Oracle and/or its affiliates.
@@ -16,9 +17,13 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_THROW_ON_EMPTY_INPUT_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_THROW_ON_EMPTY_INPUT_HPP
+
#include <boost/geometry/core/exception.hpp>
#include <boost/geometry/algorithms/is_empty.hpp>
+#include <boost/throw_exception.hpp>
+
+
// BSG 2012-02-06: we use this currently only for distance.
// For other scalar results area,length,perimeter it is commented on purpose.
// Reason is that for distance there is no other choice. distance of two
@@ -46,7 +51,7 @@ inline void throw_on_empty_input(Geometry const& geometry)
#if ! defined(BOOST_GEOMETRY_EMPTY_INPUT_NO_THROW)
if (geometry::is_empty(geometry))
{
- throw empty_input_exception();
+ BOOST_THROW_EXCEPTION(empty_input_exception());
}
#else
boost::ignore_unused(geometry);