summaryrefslogtreecommitdiff
path: root/boost/geometry/io/wkt/read.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/io/wkt/read.hpp')
-rw-r--r--boost/geometry/io/wkt/read.hpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/boost/geometry/io/wkt/read.hpp b/boost/geometry/io/wkt/read.hpp
index 148a5769dd..236690dc2c 100644
--- a/boost/geometry/io/wkt/read.hpp
+++ b/boost/geometry/io/wkt/read.hpp
@@ -3,6 +3,7 @@
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
// This file was modified by Oracle on 2014, 2015.
// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
@@ -31,6 +32,7 @@
#include <boost/range/end.hpp>
#include <boost/range/size.hpp>
#include <boost/range/value_type.hpp>
+#include <boost/throw_exception.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_reference.hpp>
@@ -139,15 +141,15 @@ struct parsing_assigner
}
catch(boost::bad_lexical_cast const& blc)
{
- throw read_wkt_exception(blc.what(), it, end, wkt);
+ BOOST_THROW_EXCEPTION(read_wkt_exception(blc.what(), it, end, wkt));
}
catch(std::exception const& e)
{
- throw read_wkt_exception(e.what(), it, end, wkt);
+ BOOST_THROW_EXCEPTION(read_wkt_exception(e.what(), it, end, wkt));
}
catch(...)
{
- throw read_wkt_exception("", it, end, wkt);
+ BOOST_THROW_EXCEPTION(read_wkt_exception("", it, end, wkt));
}
parsing_assigner<Point, Dimension + 1, DimensionCount>::apply(
@@ -175,7 +177,7 @@ inline void handle_open_parenthesis(Iterator& it,
{
if (it == end || *it != "(")
{
- throw read_wkt_exception("Expected '('", it, end, wkt);
+ BOOST_THROW_EXCEPTION(read_wkt_exception("Expected '('", it, end, wkt));
}
++it;
}
@@ -192,7 +194,7 @@ inline void handle_close_parenthesis(Iterator& it,
}
else
{
- throw read_wkt_exception("Expected ')'", it, end, wkt);
+ BOOST_THROW_EXCEPTION(read_wkt_exception("Expected ')'", it, end, wkt));
}
}
@@ -203,7 +205,7 @@ inline void check_end(Iterator& it,
{
if (it != end)
{
- throw read_wkt_exception("Too much tokens", it, end, wkt);
+ BOOST_THROW_EXCEPTION(read_wkt_exception("Too many tokens", it, end, wkt));
}
}
@@ -529,7 +531,7 @@ inline bool initialize(tokenizer const& tokens,
if (has_z && dimension<Geometry>::type::value < 3)
{
- throw read_wkt_exception("Z only allowed for 3 or more dimensions", wkt);
+ BOOST_THROW_EXCEPTION(read_wkt_exception("Z only allowed for 3 or more dimensions", wkt));
}
#if defined(_MSC_VER)
@@ -545,7 +547,7 @@ inline bool initialize(tokenizer const& tokens,
return true;
}
- throw read_wkt_exception(std::string("Should start with '") + geometry_name + "'", wkt);
+ BOOST_THROW_EXCEPTION(read_wkt_exception(std::string("Should start with '") + geometry_name + "'", wkt));
}
@@ -702,7 +704,7 @@ struct box_parser
}
else
{
- throw read_wkt_exception("Should start with 'POLYGON' or 'BOX'", wkt);
+ BOOST_THROW_EXCEPTION(read_wkt_exception("Should start with 'POLYGON' or 'BOX'", wkt));
}
typedef typename point_type<Box>::type point_type;
@@ -729,7 +731,7 @@ struct box_parser
}
else
{
- throw read_wkt_exception("Box should have 2,4 or 5 points", wkt);
+ BOOST_THROW_EXCEPTION(read_wkt_exception("Box should have 2,4 or 5 points", wkt));
}
geometry::detail::assign_point_to_index<min_corner>(points.front(), box);
@@ -760,7 +762,7 @@ struct segment_parser
}
else
{
- throw read_wkt_exception("Should start with 'LINESTRING' or 'SEGMENT'", wkt);
+ BOOST_THROW_EXCEPTION(read_wkt_exception("Should start with 'LINESTRING' or 'SEGMENT'", wkt));
}
typedef typename point_type<Segment>::type point_type;
@@ -776,7 +778,7 @@ struct segment_parser
}
else
{
- throw read_wkt_exception("Segment should have 2 points", wkt);
+ BOOST_THROW_EXCEPTION(read_wkt_exception("Segment should have 2 points", wkt));
}
}