casacore
Loading...
Searching...
No Matches
Assert.h File Reference
#include <casacore/casa/aips.h>
#include <casacore/casa/Exceptions/Error.h>

Go to the source code of this file.

Namespaces

namespace  casacore
 For temporary backward namespace compatibility, use casa as alias for casacore.

Macros

#define AlwaysAssert(expr, exception)
 These marcos are provided for use instead of simply using the assert_ function directly.
#define AlwaysAssertExit(expr)
#define DebugAssert(expr, exception)
#define DebugAssertExit(expr)

Functions

template<typename t>
void casacore::assert_ (bool expr, const char *msg, const char *file, int line)
 

Macro Definition Documentation

◆ AlwaysAssert

#define AlwaysAssert ( expr,
exception )

These marcos are provided for use instead of simply using the assert_ function directly.

DebugAssert and AlwaysAssert are designed to be used by library elements because they actually raise an exception which can later be later caught. DebugAssertExit and AlwaysAssertExit are intended to be used by the applications writer, because they cause an exit(0).

Definition at line 133 of file Assert.h.

Referenced by casacore::MArrayMath_global_functions_MArray_mathematical_operations::boxedArrayMath(), casacore::TableExprIdAggr::cast(), casacore::JsonValue::fillArray(), makeArray(), casacore::MArrayMath_global_functions_MArray_mathematical_operations::partialArrayMath(), casacore::set_size(), casacore::python::stl_variable_capacity_policy::set_value(), and casacore::MArrayMath_global_functions_MArray_mathematical_operations::slidingArrayMath().

◆ AlwaysAssertExit

#define AlwaysAssertExit ( expr)

Definition at line 138 of file Assert.h.

◆ DebugAssert

◆ DebugAssertExit

#define DebugAssertExit ( expr)

Definition at line 162 of file Assert.h.