diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-03 17:04:47 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-03 17:04:47 +0100 |
commit | f8ce2ba0c02abc7ed1c0d22c178bf451eef6a5d7 (patch) | |
tree | bd615d737f0a66c9cb562902f58e78c410da51fb /src/core/common/Logger.hpp | |
parent | 3d1acdea884ce748be20c1fafb8ec15510235f57 (diff) |
Changed behaviour of log exception with addition source location: exception has now precedence
Diffstat (limited to 'src/core/common/Logger.hpp')
-rw-r--r-- | src/core/common/Logger.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
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); } /** |