6 #ifndef PCPP_ASSERT_USE_C_ASSERT
7 # define PCPP_ASSERT_USE_C_ASSERT 0
11 #if PCPP_ASSERT_USE_C_ASSERT
26 using std::logic_error::logic_error;
32 # if PCPP_ASSERT_USE_C_ASSERT
33 # define PCPP_ASSERT(condition, message) assert((condition) && (message))
35 # define PCPP_ASSERT(condition, message) \
40 std::stringstream ss; \
41 ss << "[PCPP] Assertion failed on [" << __FILE__ << ":" << __LINE__ << "] with: " << (message); \
42 throw pcpp::internal::AssertionError(ss.str()); \
47 # define PCPP_ASSERT(condition, message) (void)0;
A custom assertion error class derived from std::logic_error to be used with PCPP_ASSERT.
Definition: AssertionUtils.h:24
The main namespace for the PcapPlusPlus lib.
Definition: AssertionUtils.h:19