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

Referenced by isc::dns::Name::Name(), isc::dns::Name::Name(), isc::dns::Name::Name(), isc::asiolink::TCPSocket< C >::asyncReceive(), isc::asiolink::TLSSocket< C >::asyncReceive(), isc::asiolink::UDPSocket< C >::asyncReceive(), isc::asiolink::UDPSocket< C >::asyncSend(), isc::dns::LabelSequence::compare(), isc::dns::Name::concatenate(), isc::dns::rdata::createRdata(), isc::dhcp::LibDHCP::D6O_BOOTFILE_URL_DEF(), isc::dhcp::LibDHCP::D6O_CLIENT_DATA_DEF(), isc::dhcp::LibDHCP::D6O_CLIENT_FQDN_DEF(), isc::dhcp::LibDHCP::D6O_LQ_QUERY_DEF(), isc::dhcp::LibDHCP::D6O_LQ_RELAY_DATA_DEF(), isc::dhcp::LibDHCP::D6O_NTP_SERVER_DEF(), isc::dhcp::LibDHCP::D6O_RSOO_DEF(), isc::dhcp::LibDHCP::DHO_DHCP_AGENT_OPTIONS_DEF(), isc::dhcp::LibDHCP::DHO_DHCP_REQUESTED_ADDRESS_DEF(), isc::dhcp::LibDHCP::DHO_DHCP_SERVER_IDENTIFIER_DEF(), isc::dhcp::LibDHCP::DHO_DOMAIN_SEARCH_DEF(), isc::dhcp::LibDHCP::DHO_STATUS_CODE_DEF(), isc::dhcp::LibDHCP::DHO_SUBNET_SELECTION_DEF(), isc::dns::TSIGContext::TSIGContextImpl::digestPreviousMAC(), isc::dns::Name::downcase(), isc::dns::BasicRRset::getLength(), isc::dns::RRset::getLength(), isc::util::io::internal::getSALength(), isc::dns::MasterLoader::MasterLoaderImpl::loadIncremental(), isc::asiolink::TCPSocket< C >::open(), isc::asiolink::TLSSocket< C >::open(), isc::dhcp::OptionCustom::readInteger(), isc::dhcp::PktFilterInet6::send(), isc::dns::LabelSequence::serialize(), isc::dns::TSIGContext::sign(), isc::dns::Name::split(), isc::dns::LabelSequence::toRawText(), isc::dns::BasicRRsetImpl::toWire(), isc::dns::master_lexer_internal::InputSource::ungetAll(), isc::dhcp::LibDHCP::unpackOptions4(), isc::dhcp::LibDHCP::unpackOptions6(), isc::dhcp::LibDHCP::unpackVendorOptions4(), and isc::dhcp::LibDHCP::unpackVendorOptions6().