Skip to content

Commit ed556af

Browse files
committed
Improving uri errors
1 parent c0b41f2 commit ed556af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/jsoncons/utility/uri.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ namespace jsoncons {
162162
*this = parse(str, ec);
163163
if (JSONCONS_UNLIKELY(ec))
164164
{
165-
JSONCONS_THROW(std::system_error(ec));
165+
JSONCONS_THROW(std::system_error(ec, std::string(str)));
166166
}
167167
}
168168

@@ -213,7 +213,7 @@ namespace jsoncons {
213213
{
214214
if (!validate_port(port))
215215
{
216-
JSONCONS_THROW(std::system_error(uri_errc::invalid_port));
216+
JSONCONS_THROW(std::system_error(uri_errc::invalid_port, std::string(port)));
217217
}
218218

219219
uri_string_.append(":");

0 commit comments

Comments
 (0)