summaryrefslogtreecommitdiff
path: root/src/core/common
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-03 17:04:47 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-03 17:04:47 +0100
commitf8ce2ba0c02abc7ed1c0d22c178bf451eef6a5d7 (patch)
treebd615d737f0a66c9cb562902f58e78c410da51fb /src/core/common
parent3d1acdea884ce748be20c1fafb8ec15510235f57 (diff)
Changed behaviour of log exception with addition source location: exception has now precedence
Diffstat (limited to 'src/core/common')
-rw-r--r--src/core/common/Logger.hpp6
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);
}
/**