From be5d629c13343f6fe1ffb4fc863d533bcfbbdf67 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 8 Sep 2016 20:54:50 +0200 Subject: [PATCH] Log: recognize class Error as nested exception --- src/Log.cxx | 4 ++++ 1 file changed, 4 insertions(+) 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");