![]() |
Kea
1.5.0
|
This is a base class for exceptions thrown from the DNS library module. More...
#include <exceptions.h>
Inheritance diagram for isc::Exception:Public Member Functions | |
Constructors and Destructor | |
| Exception (const char *file, size_t line, const char *what) | |
| Constructor for a given type for exceptions with file name and file line number. More... | |
| Exception (const char *file, size_t line, const std::string &what) | |
| Constructor for a given type for exceptions with file name and file line number. More... | |
| virtual | ~Exception () throw () |
| The destructor. More... | |
Methods Reimplemented against the Standard Exception Class | |
| virtual const char * | what () const throw () |
| Returns a C-style character string of the cause of the exception. More... | |
| virtual const char * | what (bool verbose) const throw () |
| Returns a C-style character string of the cause of exception. More... | |
Getter Methods | |
| const std::string & | getMessage () const |
| Gets a string describing the cause of the exception. More... | |
| const char * | getFile () const |
| Gets the file name where the exception was thrown. More... | |
| size_t | getLine () const |
| Gets the line number of the file where the exception was thrown. More... | |
This is a base class for exceptions thrown from the DNS library module.
Normally, the exceptions are thrown via a convenient shortcut macro, isc_throw, which automatically gives trivial parameters for the exception such as the file name and line number where the exception is triggered.
Definition at line 23 of file exceptions/exceptions.h.
| isc::Exception::Exception | ( | const char * | file, |
| size_t | line, | ||
| const char * | what | ||
| ) |
Constructor for a given type for exceptions with file name and file line number.
| file | the file name where the exception was thrown. |
| line | the line in file where the exception was thrown. |
| what | a description (type) of the exception. |
Definition at line 17 of file exceptions/exceptions.cc.
| isc::Exception::Exception | ( | const char * | file, |
| size_t | line, | ||
| const std::string & | what | ||
| ) |
Constructor for a given type for exceptions with file name and file line number.
| file | the file name where the exception was thrown. |
| line | the line in file where the exception was thrown. |
| what | a description (type) of the exception. |
Definition at line 24 of file exceptions/exceptions.cc.
|
inlinevirtual | |||||||||||||
The destructor.
Definition at line 46 of file exceptions/exceptions.h.
|
inline |
Gets the file name where the exception was thrown.
Definition at line 90 of file exceptions/exceptions.h.
Referenced by isc::util::unittests::run_all().
|
inline |
Gets the line number of the file where the exception was thrown.
Definition at line 95 of file exceptions/exceptions.h.
Referenced by isc::util::unittests::run_all().
|
inline |
Gets a string describing the cause of the exception.
Definition at line 85 of file exceptions/exceptions.h.
|
virtual | |||||||||||||
Returns a C-style character string of the cause of the exception.
Note: we normally don't use exception specifications, but this is an "exception" to that policy as it's enforced by the base class.
Definition at line 32 of file exceptions/exceptions.cc.
Referenced by isc::util::StateSet::add(), isc::dhcp::RelayInfoParser::addAddress(), isc::d2::NameChangeTransaction::addDhcidRdata(), isc::dhcp::CqlLeaseMgr::addLease(), isc::d2::NameChangeTransaction::addLeaseAddressRdata(), isc::d2::NameChangeTransaction::addPtrRdata(), isc::dhcp::AllocEngine::allocateLease4(), isc::dhcp::AllocEngine::allocateLeases6(), isc::log::Formatter< Logger >::arg(), isc::dhcp::Dhcpv4Srv::assignLease(), isc::http::HttpConnection::asyncAccept(), isc::db::CqlCommon::bindData(), isc::ha::HAImpl::buffer4Receive(), isc::ha::HAImpl::buffer6Receive(), isc::process::DControllerBase::checkConfigOnly(), isc::d2::D2Process::checkQueueStatus(), isc::agent::CtrlAgentProcess::configure(), isc::process::DControllerBase::configWriteHandler(), isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(), isc::dhcp::PgSqlLease6Exchange::convertFromDatabase(), isc::http::HttpRequest::create(), isc::http::HttpResponse::create(), isc::dhcp::CqlLease4Exchange::createBindForDelete(), isc::dhcp::CqlHostExchange::createBindForDelete(), isc::dhcp::CqlLease6Exchange::createBindForDelete(), isc::dhcp::CqlLease4Exchange::createBindForInsert(), isc::dhcp::CqlLease6Exchange::createBindForInsert(), isc::dhcp::CqlHostExchange::createBindForMutation(), isc::dhcp::PgSqlLease4Exchange::createBindForSend(), isc::dhcp::MySqlLease4Exchange::createBindForSend(), isc::dhcp::PgSqlLease6Exchange::createBindForSend(), isc::dhcp::MySqlLease6Exchange::createBindForSend(), isc::dhcp::CqlLease4Exchange::createBindForUpdate(), isc::dhcp::CqlLease6Exchange::createBindForUpdate(), isc::dhcp::PacketQueueMgr< PacketQueue4Ptr >::createPacketQueue(), isc::dns::rdata::createRdata(), isc::util::StateModel::defineEvent(), isc::util::StateModel::defineState(), isc::dhcp::CqlLeaseMgr::deleteLease(), isc::yang::TranslatorBasic::delItem(), isc::dhcp::Dhcpv6Srv::evaluateClasses(), isc::dhcp::Dhcpv4Srv::evaluateClasses(), isc::config::CmdsImpl::extractCommand(), isc::cryptolink::HashImpl::final(), isc::dhcp_ddns::NameChangeRequest::fromFormat(), isc::dhcp_ddns::NameChangeRequest::fromJSON(), isc::dhcp_ddns::D2Dhcid::fromStr(), isc::dns::rdata::generic::Generic::Generic(), isc::data::SimpleParser::getAddress(), isc::yang::TranslatorClass::getClass(), isc::yang::TranslatorClasses::getClasses(), isc::yang::TranslatorConfig::getConfig(), isc::yang::TranslatorControlSocket::getControlSocket(), isc::db::CqlCommon::getData(), isc::yang::TranslatorDatabase::getDatabase(), isc::yang::TranslatorDatabases::getDatabases(), isc::http::HttpMessage::getHeaderValueAsUint64(), isc::yang::TranslatorHost::getHost(), isc::dhcp::MySqlHostDataSourceImpl::getHostCollection(), isc::yang::TranslatorHosts::getHosts(), isc::yang::TranslatorBasic::getItem(), isc::yang::TranslatorBasic::getItems(), isc::http::HttpResponseJson::getJsonElement(), isc::http::PostHttpRequestJson::getJsonElement(), isc::dhcp::OptionDataTypeUtil::getLabelCount(), isc::yang::TranslatorLogger::getLogger(), isc::yang::TranslatorLoggers::getLoggers(), isc::yang::TranslatorOptionData::getOptionData(), isc::yang::TranslatorOptionDataList::getOptionDataList(), isc::yang::TranslatorOptionDef::getOptionDef(), isc::yang::TranslatorOptionDefList::getOptionDefList(), isc::yang::TranslatorPdPool::getPdPool(), isc::yang::TranslatorPdPools::getPdPools(), isc::yang::TranslatorPool::getPool(), isc::yang::TranslatorPools::getPools(), isc::yang::TranslatorSharedNetwork::getSharedNetwork(), isc::yang::TranslatorSharedNetworks::getSharedNetworks(), isc::yang::TranslatorSubnet::getSubnet(), isc::cryptolink::HashImpl::HashImpl(), isc::cryptolink::HMACImpl::HMACImpl(), isc::dhcp::IfaceMgr::IfaceMgr(), isc::util::StateModel::initDictionaries(), isc::cryptolink::CryptoLink::initialize(), isc::process::DControllerBase::initProcess(), isc::dhcp::Subnet4ConfigParser::initSubnet(), isc::dhcp::Subnet6ConfigParser::initSubnet(), isc::netconf::NetconfAgent::initSysrepo(), isc::dhcp::CqlHostDataSourceImpl::insertOrDeleteHost(), isc::util::SignalSet::invokeOnReceiptHandler(), isc::dhcp_ddns::NameChangeListener::invokeRecvHandler(), isc::dhcp_ddns::NameChangeSender::invokeSendHandler(), isc::lfc::LFCController::launch(), isc::process::DControllerBase::launch(), isc::dhcp::ControlledDhcpv4Srv::loadConfigFile(), isc::dhcp::ControlledDhcpv6Srv::loadConfigFile(), isc::dns::MasterLoader::MasterLoaderImpl::loadIncremental(), main(), user_chk::UserFile::makeUser(), isc::util::CSVFile::next(), isc::config::CommandMgrImpl::openCommandSocket(), isc::db::CqlConnection::openDatabase(), isc::dhcp::IfaceMgr::openSocketFromRemoteAddress(), isc::dhcp::IfaceMgr::openSockets4(), isc::dhcp::IfaceMgr::openSockets6(), isc::d2::DNSClientImpl::operator()(), isc::dhcp::OptionDefinition::optionFactory(), isc::perfdhcp::PktTransform::pack(), isc::dhcp::Pkt4::pack(), isc::dhcp::Pkt6::packUDP(), isc::ha::HAConfigParser::parse(), isc::process::ConfigControlParser::parse(), isc::dhcp::SharedNetwork4Parser::parse(), isc::dhcp::DUIDConfigParser::parse(), isc::dhcp::IfacesConfigParser::parse(), isc::dhcp::SharedNetworksListParser< SharedNetworkParserType >::parse(), isc::dhcp::SharedNetwork6Parser::parse(), isc::dhcp::ExpirationConfigParser::parse(), isc::dhcp::ExpressionParser::parse(), isc::dhcp::ClientClassDefParser::parse(), isc::netconf::NetconfCfgMgr::parse(), isc::agent::CtrlAgentCfgMgr::parse(), isc::dhcp::MACSourcesListConfigParser::parse(), isc::dhcp::OptionDefParser::parse(), isc::dhcp::OptionDefListParser::parse(), isc::d2::D2CfgMgr::parse(), isc::netconf::ControlSocketConfigParser::parse(), isc::dhcp::PoolParser::parse(), isc::netconf::ServerConfigParser::parse(), isc::dhcp::SubnetConfigParser::parse(), isc::dhcp::Subnets4ListConfigParser::parse(), isc::dhcp::PdPoolParser::parse(), isc::d2::TSIGKeyInfoParser::parse(), isc::dhcp::Subnets6ListConfigParser::parse(), isc::dhcp::D2ClientConfigParser::parse(), isc::http::PostHttpRequestJson::parseBodyAsJson(), isc::http::HttpResponseJson::parseBodyAsJson(), isc::dhcp::HostReservationParser4::parseInternal(), isc::dhcp::HostReservationParser6::parseInternal(), isc::dhcp::HostReservationIdsParser::parseInternal(), isc::dhcp::Option4ClientFqdnImpl::parseWireData(), isc::util::io::SocketSessionReceiver::pop(), isc::dhcp::CqlHostExchange::prepareExchange(), isc::d2::NameChangeTransaction::prepNewRequest(), isc::dhcp::Dhcpv4Srv::processClientName(), isc::dhcp::ControlledDhcpv4Srv::processCommand(), isc::dhcp::ControlledDhcpv6Srv::processCommand(), isc::config::BaseCommandMgr::processCommand(), isc::dhcp::Dhcpv6Srv::processPacket(), isc::dhcp::Dhcpv4Srv::processPacket(), isc::dhcp::Dhcpv4Srv::processRelease(), isc::util::CSVRow::readAndConvertAt(), isc::dhcp::OptionDataTypeUtil::readFqdn(), isc::dhcp::OptionDataTypeUtil::readPrefix(), isc::dhcp::OptionDataTypeUtil::readTuple(), isc::dhcp_ddns::NameChangeUDPListener::receiveCompletionHandler(), isc::perfdhcp::TestControl::receivePackets(), isc::d2::D2Process::reconfigureQueueMgr(), isc::util::CSVFile::recreate(), user_chk::UserRegistry::refresh(), isc::dhcp::AllocEngine::renewLeases6(), isc::dhcp::Dhcpv6Srv::requiredClassify(), isc::dhcp::Dhcpv4Srv::requiredClassify(), isc::dhcp::CqlLease4Exchange::retrieve(), isc::dhcp::CqlHostExchange::retrieve(), isc::dhcp::CqlLease6Exchange::retrieve(), isc::dhcp::CqlHostExchange::retrieveOption(), isc::d2::D2CfgMgr::reverseIpAddress(), isc::netconf::NetconfProcess::run(), isc::agent::CtrlAgentProcess::run(), isc::d2::D2Process::run(), isc::util::unittests::run_all(), isc::hooks::LibraryManager::runLoad(), isc::hooks::LibraryManager::runUnload(), isc::dhcp::Dhcpv6Srv::sanityCheck(), isc::util::str::StringSanitizerImpl::scrub(), isc::db::MySqlConnection::selectQuery(), isc::dhcp_ddns::NameChangeRequest::setChangeType(), isc::yang::TranslatorClass::setClass(), isc::yang::TranslatorClasses::setClasses(), isc::yang::TranslatorConfig::setConfig(), isc::yang::TranslatorControlSocket::setControlSocket(), isc::yang::TranslatorDatabase::setDatabase(), isc::yang::TranslatorDatabases::setDatabases(), isc::dhcp_ddns::NameChangeRequest::setForwardChange(), isc::dhcp_ddns::NameChangeRequest::setFqdn(), isc::yang::TranslatorHost::setHost(), isc::yang::TranslatorHosts::setHosts(), isc::yang::TranslatorBasic::setItem(), isc::dhcp_ddns::NameChangeRequest::setLeaseLength(), isc::yang::TranslatorLogger::setLogger(), isc::yang::TranslatorLoggers::setLoggers(), isc::yang::TranslatorOptionData::setOptionData(), isc::yang::TranslatorOptionDataList::setOptionDataList(), isc::yang::TranslatorOptionDef::setOptionDef(), isc::yang::TranslatorOptionDefList::setOptionDefList(), isc::yang::TranslatorPdPool::setPdPool(), isc::yang::TranslatorPdPools::setPdPools(), isc::yang::TranslatorPool::setPool(), isc::yang::TranslatorPools::setPools(), isc::dhcp_ddns::NameChangeRequest::setReverseChange(), isc::cryptolink::HMACImpl::sign(), isc::http::HttpListenerImpl::start(), isc::d2::D2QueueMgr::startListening(), isc::dhcp_ddns::NameChangeListener::startListening(), isc::dhcp_ddns::NameChangeSender::startSending(), isc::stat_cmds::LeaseStatCmdsImpl::statLease4GetHandler(), isc::stat_cmds::LeaseStatCmdsImpl::statLease6GetHandler(), isc::dhcp_ddns::NameChangeListener::stopListening(), isc::dhcp_ddns::NameChangeSender::stopSending(), isc::util::str::StringSanitizerImpl::StringSanitizerImpl(), isc::config::JSONFeed::toElement(), isc::dns::TSIGKey::TSIGKey(), isc::perfdhcp::PktTransform::unpack(), isc::cryptolink::HashImpl::update(), isc::cryptolink::HMACImpl::update(), isc::dhcp::CqlLeaseMgr::updateLease4(), isc::dhcp::CqlLeaseMgr::updateLease6(), isc::cryptolink::HMACImpl::verify(), isc::dhcp::OptionDataTypeUtil::writeBinary(), and isc::dhcp::OptionDataTypeUtil::writeFqdn().
|
virtual | ||||||||||||||
Returns a C-style character string of the cause of exception.
With verbose set to true, also returns file name and line numbers. Note that we can't simply define a single what() method with parameters, as the compiler would complain that it shadows the base class method.
| verbose | if set to true, filename and line number will be added. |
Definition at line 37 of file exceptions/exceptions.cc.