Skip to content

Commit 99b9eb3

Browse files
committed
rename exception: std::out_of_range
1 parent 4ab9e48 commit 99b9eb3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

boost/network/uri/decode.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ OutputIterator decode(const InputIterator &in_begin,
5959
OutputIterator out = out_begin;
6060
while (it != in_end) {
6161
if (*it == '%') {
62-
if (++it == in_end) throw std::runtime_error("decoding fail because of '%'");
62+
if (++it == in_end) throw std::out_of_range("out_of_range exception");
6363
value_type v0 = detail::letter_to_hex(*it);
64-
if (++it == in_end) throw std::runtime_error("decoding fail because of '%'");
64+
if (++it == in_end) throw std::out_of_range("out_of_range exception");
6565
value_type v1 = detail::letter_to_hex(*it);
6666
++it;
6767
*out++ = 0x10 * v0 + v1;

libs/network/test/uri/uri_encoding_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ BOOST_AUTO_TEST_CASE(decoding_throw_test) {
5252
const std::string encoded("%");
5353

5454
std::string instance;
55-
BOOST_CHECK_THROW(uri::decoded(encoded), std::runtime_error);
55+
BOOST_CHECK_THROW(uri::decoded(encoded), std::out_of_range);
5656
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy