From: Gerd v. Egidy Date: Sat, 4 Sep 2004 15:13:50 +0000 (+0000) Subject: libi2ncommon: (gerd) fix exceptions in IP_RANGE X-Git-Tag: v2.6~238 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=3a488cb32a43d3d6134e5a85f9a58ea7a66c16d8;p=libi2ncommon libi2ncommon: (gerd) fix exceptions in IP_RANGE --- 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()