From 9fd0ef9a61900ce300bcd928a5ee3b9cbf78afbf Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 22 Sep 2021 10:49:47 +0200 Subject: [PATCH] exceptions: show config error --- common/include/villas/exceptions.hpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/common/include/villas/exceptions.hpp b/common/include/villas/exceptions.hpp index 6d40da9fc..0310b6fd2 100644 --- a/common/include/villas/exceptions.hpp +++ b/common/include/villas/exceptions.hpp @@ -108,14 +108,15 @@ protected: std::stringstream ss; ss << std::runtime_error::what() << std::endl; - ss << std::endl << " Please consult the user documentation for details: " << std::endl; - ss << " " << docUri(); if (error.position >= 0) { ss << std::endl; - ss << " " << error.text << " in " << error.source << ":" << error.line << ":" << error.column; + ss << " " << error.text << " in " << error.source << ":" << error.line << ":" << error.column << std::endl; } + ss << std::endl << " Please consult the user documentation for details: " << std::endl; + ss << " " << docUri(); + ss << std::endl; return ss.str(); @@ -157,8 +158,6 @@ public: setting(s), error(e) { - error.position = -1; - msg = strdup(getMessage().c_str()); } @@ -169,8 +168,6 @@ public: setting(s), error(e) { - error.position = -1; - msg = strdup(getMessage().c_str()); }