@@ -7,7 +7,7 @@ std::string asyncio::http::urlEscape(const std::string &str) {
77 };
88
99 if (!ptr)
10- throw zero::error::SystemError {errno, std::generic_category ()};
10+ throw zero::error::StacktraceError<std::system_error> {errno, std::generic_category ()};
1111
1212 return ptr.get ();
1313}
@@ -21,7 +21,7 @@ std::string asyncio::http::urlUnescape(const std::string &str) {
2121 };
2222
2323 if (!ptr)
24- throw zero::error::SystemError {errno, std::generic_category ()};
24+ throw zero::error::StacktraceError<std::system_error> {errno, std::generic_category ()};
2525
2626 return std::string{ptr.get (), static_cast <std::size_t >(length)};
2727}
@@ -31,7 +31,7 @@ asyncio::http::URL::URL(std::unique_ptr<CURLU, decltype(&curl_url_cleanup)> url)
3131
3232asyncio::http::URL::URL (const URL &rhs) : mURL{curl_url_dup (rhs.mURL .get ()), curl_url_cleanup} {
3333 if (!mURL )
34- throw zero::error::SystemError {errno, std::generic_category ()};
34+ throw zero::error::StacktraceError<std::system_error> {errno, std::generic_category ()};
3535}
3636
3737asyncio::http::URL::URL (URL &&rhs) noexcept : mURL{std::move (rhs.mURL )} {
@@ -44,7 +44,7 @@ asyncio::http::URL &asyncio::http::URL::operator=(const URL &rhs) {
4444 mURL = {curl_url_dup (rhs.mURL .get ()), curl_url_cleanup};
4545
4646 if (!mURL )
47- throw zero::error::SystemError {errno, std::generic_category ()};
47+ throw zero::error::StacktraceError<std::system_error> {errno, std::generic_category ()};
4848
4949 return *this ;
5050}
@@ -58,7 +58,7 @@ std::expected<asyncio::http::URL, std::error_code> asyncio::http::URL::from(cons
5858 std::unique_ptr<CURLU, decltype (&curl_url_cleanup)> url{curl_url (), curl_url_cleanup};
5959
6060 if (!url)
61- throw zero::error::SystemError {errno, std::generic_category ()};
61+ throw zero::error::StacktraceError<std::system_error> {errno, std::generic_category ()};
6262
6363 Z_EXPECT (expected ([&] {
6464 return curl_url_set (url.get (), CURLUPART_URL, str.c_str (), CURLU_NON_SUPPORT_SCHEME);
@@ -94,7 +94,7 @@ std::optional<std::string> asyncio::http::URL::user() const {
9494 return curl_url_get (mURL .get (), CURLUPART_USER, &user, CURLU_URLDECODE);
9595 }); !result) {
9696 if (const auto &error = result.error (); error != static_cast <Error>(CURLUE_NO_USER))
97- throw zero::error::SystemError {error};
97+ throw zero::error::StacktraceError<std::system_error> {error};
9898
9999 return std::nullopt ;
100100 }
@@ -109,7 +109,7 @@ std::optional<std::string> asyncio::http::URL::password() const {
109109 return curl_url_get (mURL .get (), CURLUPART_PASSWORD, &password, CURLU_URLDECODE);
110110 }); !result) {
111111 if (const auto &error = result.error (); error != static_cast <Error>(CURLUE_NO_PASSWORD))
112- throw zero::error::SystemError {error};
112+ throw zero::error::StacktraceError<std::system_error> {error};
113113
114114 return std::nullopt ;
115115 }
@@ -124,7 +124,7 @@ std::optional<std::string> asyncio::http::URL::host() const {
124124 return curl_url_get (mURL .get (), CURLUPART_HOST, &host, 0 );
125125 }); !result) {
126126 if (const auto &error = result.error (); error != static_cast <Error>(CURLUE_NO_HOST))
127- throw zero::error::SystemError {error};
127+ throw zero::error::StacktraceError<std::system_error> {error};
128128
129129 return std::nullopt ;
130130 }
@@ -159,7 +159,7 @@ std::optional<std::string> asyncio::http::URL::query() const {
159159 return curl_url_get (mURL .get (), CURLUPART_QUERY, &query, CURLU_URLDECODE);
160160 }); !result) {
161161 if (const auto &error = result.error (); error != static_cast <Error>(CURLUE_NO_QUERY))
162- throw zero::error::SystemError {error};
162+ throw zero::error::StacktraceError<std::system_error> {error};
163163
164164 return std::nullopt ;
165165 }
@@ -174,7 +174,7 @@ std::optional<std::string> asyncio::http::URL::rawQuery() const {
174174 return curl_url_get (mURL .get (), CURLUPART_QUERY, &query, 0 );
175175 }); !result) {
176176 if (const auto &error = result.error (); error != static_cast <Error>(CURLUE_NO_QUERY))
177- throw zero::error::SystemError {error};
177+ throw zero::error::StacktraceError<std::system_error> {error};
178178
179179 return std::nullopt ;
180180 }
@@ -189,7 +189,7 @@ std::optional<std::string> asyncio::http::URL::fragment() const {
189189 return curl_url_get (mURL .get (), CURLUPART_FRAGMENT, &fragment, CURLU_URLDECODE);
190190 }); !result) {
191191 if (const auto &error = result.error (); error != static_cast <Error>(CURLUE_NO_FRAGMENT))
192- throw zero::error::SystemError {error};
192+ throw zero::error::StacktraceError<std::system_error> {error};
193193
194194 return std::nullopt ;
195195 }
@@ -204,7 +204,7 @@ std::optional<std::uint16_t> asyncio::http::URL::port() const {
204204 return curl_url_get (mURL .get (), CURLUPART_PORT, &port, CURLU_DEFAULT_PORT);
205205 }); !result) {
206206 if (const auto &error = result.error (); error != static_cast <Error>(CURLUE_NO_PORT))
207- throw zero::error::SystemError {error};
207+ throw zero::error::StacktraceError<std::system_error> {error};
208208
209209 return std::nullopt ;
210210 }
0 commit comments