@@ -171,11 +171,7 @@ class ws_desktop_client : public _websocket_client_impl, public std::enable_shar
171171 m_client.close (m_con, static_cast <websocketpp::close::status::value>(status), utility::conversions::to_utf8string (reason), ec);
172172 if (ec.value () != 0 )
173173 {
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 ()));
179175 return pplx::task_from_exception<void >(wx);
180176 }
181177 }
@@ -278,11 +274,7 @@ class ws_desktop_client : public _websocket_client_impl, public std::enable_shar
278274 m_con = con;
279275 if (ec.value () != 0 )
280276 {
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 ()));
286278 return pplx::task_from_exception<void >(wx);
287279 }
288280
@@ -449,11 +441,7 @@ class ws_desktop_client : public _websocket_client_impl, public std::enable_shar
449441 auto ec = previousTask.get ();
450442 if (ec.value () != 0 )
451443 {
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 ()));
457445 eptr = std::make_exception_ptr (wx);
458446 }
459447 }
0 commit comments