summaryrefslogtreecommitdiff
path: root/src/Log.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-09-08 20:54:50 +0200
committerMax Kellermann <max@musicpd.org>2016-09-08 20:54:55 +0200
commitbe5d629c13343f6fe1ffb4fc863d533bcfbbdf67 (patch)
treed9b1da96a38ebc66f656855e26c53109eee319c5 /src/Log.cxx
parent957b399e9088cf8e7dc885be2e60acad8b6fb5c6 (diff)
Log: recognize class Error as nested exception
Diffstat (limited to 'src/Log.cxx')
-rw-r--r--src/Log.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Log.cxx b/src/Log.cxx
index 4d37b36f7..4f496eaf9 100644
--- a/src/Log.cxx
+++ b/src/Log.cxx
@@ -98,6 +98,8 @@ LogError(const std::exception &e)
std::rethrow_if_nested(e);
} catch (const std::exception &nested) {
LogError(nested, "nested");
+ } catch (const Error &nested) {
+ LogError(nested, "nested");
} catch (...) {
Log(exception_domain, LogLevel::ERROR,
"Unrecognized nested exception");
@@ -113,6 +115,8 @@ LogError(const std::exception &e, const char *msg)
std::rethrow_if_nested(e);
} catch (const std::exception &nested) {
LogError(nested);
+ } catch (const Error &nested) {
+ LogError(nested);
} catch (...) {
Log(exception_domain, LogLevel::ERROR,
"Unrecognized nested exception");