command/Error: workaround for gcc 4.x rethrow_exception(exception_ptr)
This commit is contained in:
parent
37862f0f20
commit
3843972b05
@ -170,9 +170,19 @@ ToAck(std::exception_ptr ep)
|
|||||||
return ToAck(pe.GetCode());
|
return ToAck(pe.GetCode());
|
||||||
} catch (const std::system_error &e) {
|
} catch (const std::system_error &e) {
|
||||||
return ACK_ERROR_SYSTEM;
|
return ACK_ERROR_SYSTEM;
|
||||||
|
#if defined(__GLIBCXX__) && __GLIBCXX__ < 20151204
|
||||||
|
} catch (const std::exception &e) {
|
||||||
|
#else
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
#endif
|
||||||
try {
|
try {
|
||||||
|
#if defined(__GLIBCXX__) && __GLIBCXX__ < 20151204
|
||||||
|
/* workaround for g++ 4.x: no overload for
|
||||||
|
rethrow_exception(exception_ptr) */
|
||||||
|
std::rethrow_if_nested(e);
|
||||||
|
#else
|
||||||
std::rethrow_if_nested(ep);
|
std::rethrow_if_nested(ep);
|
||||||
|
#endif
|
||||||
return ACK_ERROR_UNKNOWN;
|
return ACK_ERROR_UNKNOWN;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
return ToAck(std::current_exception());
|
return ToAck(std::current_exception());
|
||||||
|
Loading…
Reference in New Issue
Block a user