Kea  1.9.9-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.


 Defines the logger used by the top-level component of kea-dhcp-ddns.


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

Macro Definition Documentation

#define isc_throw_assert (   expr)
if(!(static_cast<bool>(expr))) \
isc_throw(isc::Unexpected, __FILE__ << ":" << __LINE__ << " (" << #expr << ") failed");\
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
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::asiolink::UDPSocket< C >::asyncReceive(), isc::asiolink::TLSSocket< C >::asyncReceive(), isc::asiolink::TCPSocket< C >::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< C >::open(), isc::asiolink::TCPSocket< C >::open(), boost::archive::iterators::detail::from_4_bit< CharType >::operator()(), boost::archive::iterators::detail::from_5_bit< CharType >::operator()(), isc::util::io::SocketSessionForwarder::push(), isc::dhcp::OptionCustom::readInteger(), 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().