Skip to content

Commit d6d29e5

Browse files
committed
Fix for VS2012
1 parent b499cea commit d6d29e5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Release/src/websockets/client/ws_client.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ 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
174177
websocket_exception wx(ec.value(), ec.category());
178+
#endif
175179
return pplx::task_from_exception<void>(wx);
176180
}
177181
}
@@ -274,7 +278,11 @@ class ws_desktop_client : public _websocket_client_impl, public std::enable_shar
274278
m_con = con;
275279
if (ec.value() != 0)
276280
{
281+
#if defined(_MSC_VER) && (_MSC_VER < 1800)
282+
websocket_exception wx(ec.value());
283+
#else
277284
websocket_exception wx(ec.value(), ec.category());
285+
#endif
278286
return pplx::task_from_exception<void>(wx);
279287
}
280288

@@ -441,7 +449,11 @@ class ws_desktop_client : public _websocket_client_impl, public std::enable_shar
441449
auto ec = previousTask.get();
442450
if (ec.value() != 0)
443451
{
452+
#if defined(_MSC_VER) && (_MSC_VER < 1800)
453+
websocket_exception wx(ec.value());
454+
#else
444455
websocket_exception wx(ec.value(), ec.category());
456+
#endif
445457
eptr = std::make_exception_ptr(wx);
446458
}
447459
}

0 commit comments

Comments
 (0)