@@ -171,11 +171,7 @@ class ws_desktop_client : public _websocket_client_impl, public std::enable_shar
171
171
m_client.close (m_con, static_cast <websocketpp::close::status::value>(status), utility::conversions::to_utf8string (reason), ec);
172
172
if (ec.value () != 0 )
173
173
{
174
- #if defined(_MSC_VER) && (_MSC_VER < 1800)
175
- websocket_exception wx (ec.value ());
176
- #else
177
- websocket_exception wx (ec.value (), ec.category ());
178
- #endif
174
+ websocket_exception wx (utility::conversions::to_string_t (ec.message ()));
179
175
return pplx::task_from_exception<void >(wx);
180
176
}
181
177
}
@@ -278,11 +274,7 @@ class ws_desktop_client : public _websocket_client_impl, public std::enable_shar
278
274
m_con = con;
279
275
if (ec.value () != 0 )
280
276
{
281
- #if defined(_MSC_VER) && (_MSC_VER < 1800)
282
- websocket_exception wx (ec.value ());
283
- #else
284
- websocket_exception wx (ec.value (), ec.category ());
285
- #endif
277
+ websocket_exception wx (utility::conversions::to_string_t (ec.message ()));
286
278
return pplx::task_from_exception<void >(wx);
287
279
}
288
280
@@ -449,11 +441,7 @@ class ws_desktop_client : public _websocket_client_impl, public std::enable_shar
449
441
auto ec = previousTask.get ();
450
442
if (ec.value () != 0 )
451
443
{
452
- #if defined(_MSC_VER) && (_MSC_VER < 1800)
453
- websocket_exception wx (ec.value ());
454
- #else
455
- websocket_exception wx (ec.value (), ec.category ());
456
- #endif
444
+ websocket_exception wx (utility::conversions::to_string_t (ec.message ()));
457
445
eptr = std::make_exception_ptr (wx);
458
446
}
459
447
}
0 commit comments