Log: recognize class Error as nested exception
This commit is contained in:
parent
957b399e90
commit
be5d629c13
@ -98,6 +98,8 @@ LogError(const std::exception &e)
|
|||||||
std::rethrow_if_nested(e);
|
std::rethrow_if_nested(e);
|
||||||
} catch (const std::exception &nested) {
|
} catch (const std::exception &nested) {
|
||||||
LogError(nested, "nested");
|
LogError(nested, "nested");
|
||||||
|
} catch (const Error &nested) {
|
||||||
|
LogError(nested, "nested");
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
Log(exception_domain, LogLevel::ERROR,
|
Log(exception_domain, LogLevel::ERROR,
|
||||||
"Unrecognized nested exception");
|
"Unrecognized nested exception");
|
||||||
@ -113,6 +115,8 @@ LogError(const std::exception &e, const char *msg)
|
|||||||
std::rethrow_if_nested(e);
|
std::rethrow_if_nested(e);
|
||||||
} catch (const std::exception &nested) {
|
} catch (const std::exception &nested) {
|
||||||
LogError(nested);
|
LogError(nested);
|
||||||
|
} catch (const Error &nested) {
|
||||||
|
LogError(nested);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
Log(exception_domain, LogLevel::ERROR,
|
Log(exception_domain, LogLevel::ERROR,
|
||||||
"Unrecognized nested exception");
|
"Unrecognized nested exception");
|
||||||
|
Loading…
Reference in New Issue
Block a user