From 54e422ea02056f32312f62536ad2e1b9ff93f9f1 Mon Sep 17 00:00:00 2001 From: Joachim Wuttke <j.wuttke@fz-juelich.de> Date: Thu, 3 Aug 2023 09:19:07 +0200 Subject: [PATCH] rm redundant cerr message from ASSERT handler --- Base/Util/Assert.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Base/Util/Assert.h b/Base/Util/Assert.h index 0ea4d52899c..6954bbe82d4 100644 --- a/Base/Util/Assert.h +++ b/Base/Util/Assert.h @@ -41,20 +41,15 @@ #else -#include <iostream> #include <stdexcept> #define ASSERT(condition) \ - if (!(condition)) { \ - std::cerr << "Throwing runtime_error: Assertion " #condition " failed in " __FILE__ \ - ", line " \ - << __LINE__ << std::endl; \ + if (!(condition)) \ throw std::runtime_error("BUG: Assertion " #condition " failed in " __FILE__ ", line " \ + std::to_string(__LINE__) \ + ".\n" \ "Please report this to the maintainers:\n" \ "- https://jugit.fz-juelich.de/mlz/bornagain/-/issues/new or\n" \ - "- contact@bornagainproject.org."); \ - } + "- contact@bornagainproject.org."); #endif // BA_DEBUG -- GitLab