13#include "NNL/common/src_info.hpp"
35#ifdef NNL_THROW_ON_CONTRACT_VIOLATION
37#define NNL_EXPECTS(precondition) \
39 if (!static_cast<bool>(precondition)) { \
40 NNL_THROW(nnl::PreconditionError(NNL_SRCTAG("precondition failed: " #precondition))); \
45#define NNL_EXPECTS(precondition) \
47 if (!static_cast<bool>(precondition)) { \
48 nnl::Panic(NNL_SRCTAG("precondition failed: " #precondition)); \
59#define NNL_EXPECTS_DBG(precondition) \
61 assert(precondition); \
72#define NNL_ENSURES_DBG(postcondition) \
74 assert(postcondition); \
Defines the library-wide exception hierarchy and error handling macros.
Provides functions to set up the callback for fatal library errors.