From cb7759cd0b00c3bce8bc6f06e01222c9dc935c7f Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Tue, 16 Jan 2024 12:43:23 +0100 Subject: [PATCH] line number in NETGEN_CHECK_SAME macro --- libsrc/core/exception.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsrc/core/exception.hpp b/libsrc/core/exception.hpp index 94885963..cf068aaf 100644 --- a/libsrc/core/exception.hpp +++ b/libsrc/core/exception.hpp @@ -92,10 +92,10 @@ namespace ngcore throw ngcore::RangeException(__FILE__ ":" NETGEN_CORE_NGEXEPTION_STR(__LINE__) "\t", int(value), int(min), int(max_plus_one)); } #define NETGEN_CHECK_SHAPE(a,b) \ { if(a.Shape() != b.Shape()) \ - throw ngcore::Exception(__FILE__": shape don't match"); } + throw ngcore::Exception(__FILE__ ":" NETGEN_CORE_NGEXEPTION_STR(__LINE__) "\t: shape don't match"); } #define NETGEN_CHECK_SAME(a,b) \ { if(a != b) \ - throw ngcore::Exception(__FILE__": not the same, a="+ToString(a) + ", b="+ToString(b)); } + throw ngcore::Exception(__FILE__ ":" NETGEN_CORE_NGEXEPTION_STR(__LINE__) "\t: not the same, a="+ToString(a) + ", b="+ToString(b)); } #define NETGEN_NOEXCEPT #else // defined(NETGEN_ENABLE_CHECK_RANGE) && !defined(__CUDA_ARCH__) #define NETGEN_CHECK_RANGE(value, min, max)