From f8ce2ba0c02abc7ed1c0d22c178bf451eef6a5d7 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Tue, 3 Feb 2015 17:04:47 +0100 Subject: Changed behaviour of log exception with addition source location: exception has now precedence --- src/core/common/Logger.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/common/Logger.hpp b/src/core/common/Logger.hpp index 8eac82e..c8b324c 100644 --- a/src/core/common/Logger.hpp +++ b/src/core/common/Logger.hpp @@ -260,15 +260,15 @@ public: * Logs the given loggable exception. * * @param ex is the exception that should be logged. - * @param loc is a location which (if valid overrides the location given in - * the exception. + * @param loc is a location which is used in case the exception has no valid + * location attached. * @param mode specifies how the message should be displayed. */ void log(const LoggableException &ex, const SourceLocation &loc = SourceLocation{}, MessageMode mode = MessageMode::DEFAULT) { - log(Severity::ERROR, ex.msg, loc.isValid() ? loc : ex.getLocation()); + log(Severity::ERROR, ex.msg, ex.getLocation().isValid() ? ex.getLocation() : loc); } /** -- cgit v1.2.3