diff --git a/Base/Util/Assert.h b/Base/Util/Assert.h index 0ea4d52899cd0f70c77995a496c85ad31961d528..6954bbe82d41f313b2070496b59629f18ed91349 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