Kea  2.1.7-git
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

 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. More...
 

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.

Referenced by isc::dhcp::OptionCustom::addArrayDataField(), isc::asiolink::UDPSocket< C >::asyncReceive(), isc::asiolink::TLSSocket< SocketCallback >::asyncReceive(), isc::asiolink::TCPSocket< SocketCallback >::asyncReceive(), isc::asiolink::UDPSocket< C >::asyncSend(), isc::dns::LabelSequence::compare(), isc::dns::Name::concatenate(), isc::dns::Name::downcase(), isc::util::io::internal::getSALength(), isc::dns::Name::Name(), isc::asiolink::TLSSocket< SocketCallback >::open(), isc::asiolink::TCPSocket< SocketCallback >::open(), boost::archive::iterators::detail::from_4_bit< CharType >::operator()(), boost::archive::iterators::detail::from_5_bit< CharType >::operator()(), isc::log::MessageReader::processLine(), isc::util::io::SocketSessionForwarder::push(), isc::dhcp::OptionCustom::readInteger(), isc::log::LoggerManagerImpl::reset(), isc::dhcp::PktFilterInet6::send(), isc::dns::LabelSequence::serialize(), isc::util::io::SocketSessionForwarder::SocketSessionForwarder(), isc::dns::Name::split(), isc::dns::LabelSequence::toRawText(), isc::dhcp::LibDHCP::unpackOptions4(), isc::dhcp::LibDHCP::unpackOptions6(), isc::dhcp::LibDHCP::unpackVendorOptions4(), and isc::dhcp::LibDHCP::unpackVendorOptions6().