Kea 2.5.8
isc_assert.h File Reference
+ Include dependency graph for isc_assert.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  isc
 Defines the logger used by the top-level component of kea-lfc.
 

Macros

#define isc_throw_assert(expr)
 Replacement for assert() that throws if the expression is false.
 

Macro Definition Documentation

◆ isc_throw_assert

#define isc_throw_assert (   expr)
Value:
{\
if(!(static_cast<bool>(expr))) \
{\
isc_throw(isc::Unexpected, __FILE__ << ":" << __LINE__ << " (" << #expr << ") failed");\
}\
}
A generic exception that is thrown when an unexpected error condition occurs.

Replacement for assert() that throws if the expression is false.

This macro exists because some of the original code uses assert() and we decided it would be better to replace them with exception throws rather than compiling out all asserts.

Definition at line 18 of file isc_assert.h.