File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,28 @@ class http_exception : public std::exception
248248 m_msg = m_errorCode.message ();
249249 }
250250
251+ // / <summary>
252+ // / Creates an <c>http_exception</c> with from a error code with a category, and a string message.
253+ // / </summary>
254+ // / <param name="errorCode">Error code value.</param>
255+ // / <param name="whatArg">Error message string.</param>
256+ http_exception (std::error_code errorCode, const utility::string_t & whatArg)
257+ : m_errorCode(std::move(errorCode)), m_msg(utility::conversions::to_utf8string(whatArg))
258+ {
259+ }
260+
261+ #ifdef _WIN32
262+ // / <summary>
263+ // / Creates an <c>http_exception</c> with from a error code with a category, and a string message.
264+ // / </summary>
265+ // / <param name="errorCode">Error code value.</param>
266+ // / <param name="whatArg">Error message string.</param>
267+ http_exception (std::error_code errorCode, std::string whatArg)
268+ : m_errorCode(std::move(errorCode)), m_msg(std::move(whatArg))
269+ {
270+ }
271+ #endif
272+
251273 // / <summary>
252274 // / Gets a string identifying the cause of the exception.
253275 // / </summary>
You can’t perform that action at this time.
0 commit comments