31 #include <casacore/casa/aips.h> 32 #include <casacore/casa/Exceptions/Error.h> 132 if (! expr)
throw(t(msg));
135 if (! ptr)
throw(t(msg));
137 assert_(
int expr,
const char *msg,
const char* file,
Int line);
138 assert_(
const void *ptr,
const char *msg,
const char* file,
Int line);
157 #define AlwaysAssert(expr, exception) \ 158 {assert_<exception > dummy_(expr, "Failed AlwaysAssert " #expr,__FILE__,(Int)__LINE__); dummy_.null(); } 159 #define AlwaysAssertExit(expr) \ 160 {assert_<AbortError> dummy_(expr, "Unrecoverable AlwaysAssertExit: " #expr,__FILE__,(Int)__LINE__); dummy_.null();} 162 #if defined(AIPS_DEBUG) 178 #define DebugAssert(expr, exception) \ 179 {assert_<exception > dummy_(expr, "Failed Assertion: " #expr,__FILE__,(Int)__LINE__); dummy_.null();} 180 #define DebugAssertExit(expr) \ 181 {assert_<AbortError> dummy_(expr, "Unrecoverable Assertion: " #expr,__FILE__,(Int)__LINE__); dummy_.null();} 185 #define DebugAssert(expr, exception) 186 #define DebugAssertExit(expr) 193 #ifndef CASACORE_NO_AUTO_TEMPLATES 194 #include <casacore/casa/Utilities/Assert.tcc> 195 #endif //# CASACORE_NO_AUTO_TEMPLATES
assert_(const void *ptr, const char *msg)
Utility class for Assert macros.
void null()
A no-op, but it keeps g++ from complaining about "variable not used" errors.
assert_(int expr, const char *msg)
this file contains all the compiler specific defines