summaryrefslogtreecommitdiff
path: root/src/core/common/Logger.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/common/Logger.hpp')
-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.
*