summaryrefslogtreecommitdiff
path: root/src/core/common
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-18 13:28:15 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-18 13:28:15 +0100
commit86d11c73f637f5e858ecb84fe6dfb90281f266a9 (patch)
treec8b0b41fd2662d2491a14f6f92a930f55724d525 /src/core/common
parent5c53ea8fb93f611a90099000fb0ba3b0874f99c5 (diff)
Allowing to override location when logging exceptions.
Diffstat (limited to 'src/core/common')
-rw-r--r--src/core/common/Logger.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/common/Logger.hpp b/src/core/common/Logger.hpp
index b365a39..767d8ab 100644
--- a/src/core/common/Logger.hpp
+++ b/src/core/common/Logger.hpp
@@ -243,6 +243,16 @@ public:
}
/**
+ * Logs the given loggable exception at the given location.
+ *
+ * @param ex is the exception that should be logged.
+ */
+ void log(const LoggableException &ex, const SourceLocation &loc)
+ {
+ log(Severity::ERROR, ex.msg, loc.valid() ? loc : ex.getLocation());
+ }
+
+ /**
* Logs the given message. The file name is set to the topmost file name on
* the file name stack.
*