From 3a488cb32a43d3d6134e5a85f9a58ea7a66c16d8 Mon Sep 17 00:00:00 2001 From: Gerd v. Egidy Date: Sat, 4 Sep 2004 15:13:50 +0000 Subject: [PATCH] libi2ncommon: (gerd) fix exceptions in IP_RANGE --- src/ipfunc.cpp | 2 +- test/ip_range.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipfunc.cpp b/src/ipfunc.cpp index 9c641e2..ee44536 100644 --- a/src/ipfunc.cpp +++ b/src/ipfunc.cpp @@ -143,7 +143,7 @@ IP_RANGE operator+(const IP_RANGE &base, const int &ips) } if (ret.t == RANGE && ret.turn_ip(ret.end) < ret.turn_ip(ret.ip)) - throw out_of_range("range end lower than begin"); + throw range_error("range end lower than begin"); return ret; } diff --git a/test/ip_range.cpp b/test/ip_range.cpp index 6f28dab..a75dd2a 100644 --- a/test/ip_range.cpp +++ b/test/ip_range.cpp @@ -369,7 +369,7 @@ class ip_range : public TestFixture void OperatorPlusOverflow() { IP_RANGE a("255.255.255.0/255.255.255.0"); - CPPUNIT_ASSERT_THROW(a=a+1, std::out_of_range); + CPPUNIT_ASSERT_THROW(a=a+1, std::range_error); } void OperatorMinus() -- 1.7.1