command/Error: support nested exceptions
This commit is contained in:
parent
19e43087a8
commit
570dcb6309
@ -171,7 +171,12 @@ ToAck(std::exception_ptr ep)
|
|||||||
} catch (const std::system_error &e) {
|
} catch (const std::system_error &e) {
|
||||||
return ACK_ERROR_SYSTEM;
|
return ACK_ERROR_SYSTEM;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
return ACK_ERROR_UNKNOWN;
|
try {
|
||||||
|
std::rethrow_if_nested(ep);
|
||||||
|
return ACK_ERROR_UNKNOWN;
|
||||||
|
} catch (...) {
|
||||||
|
return ToAck(std::current_exception());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user