Go to the source code of this file.
Classes | |
class | TextException |
an std::runtime_error with thrower location info More... | |
Macros | |
#define | TexcHere(msg) TextException((msg), Here()) |
legacy convenience macro; it is not difficult to type Here() now More... | |
#define | Must3(condition, description, location) Assure_(3, (condition), ("check failed: " description), (location)) |
#define | Must(condition) Must3((condition), #condition, Here()) |
#define | SWALLOW_EXCEPTIONS(code) |
Functions | |
std::ostream & | CurrentException (std::ostream &) |
prints active (i.e., thrown but not yet handled) exception More... | |
std::ostream & | CurrentExceptionExtra (std::ostream &) |
std::ostream & | operator<< (std::ostream &, const TextException &) |
efficiently prints TextException More... | |
Macro Definition Documentation
◆ Must
Like Assure() but only logs the exception if level-3 debugging is enabled and runs even when NDEBUG macro is defined. Deprecated: Use Assure() for code logic checks and throw explicitly when input validation fails.
Definition at line 75 of file TextException.h.
◆ Must3
#define Must3 | ( | condition, | |
description, | |||
location | |||
) | Assure_(3, (condition), ("check failed: " description), (location)) |
Like Must() but supports custom exception message and location.
- Parameters
-
description string literal describing the condition; what MUST happen Deprecated: Use Assure2() for code logic checks and throw explicitly when input validation fails.
Definition at line 69 of file TextException.h.
◆ SWALLOW_EXCEPTIONS
#define SWALLOW_EXCEPTIONS | ( | code | ) |
Reports and swallows all exceptions to prevent compiler warnings and runtime errors related to throwing class destructors. Should be used for most dtors.
Definition at line 79 of file TextException.h.
◆ TexcHere
#define TexcHere | ( | msg | ) | TextException((msg), Here()) |
Definition at line 63 of file TextException.h.
Function Documentation
◆ CurrentException()
std::ostream & CurrentException | ( | std::ostream & | os | ) |
Definition at line 88 of file TextException.cc.
References CurrentException_().
Referenced by Comm::TcpAcceptor::acceptOne(), FwdState::advanceDestination(), TunnelStateData::advanceDestination(), StoreEntry::checkDisk(), Rock::IoState::close(), HttpStateData::decodeAndWriteReplyBody(), MemStore::get(), Security::KeyData::loadCertificates(), main(), mimeInit(), ESIContext::parse(), ACLRegexData::parse(), Ssl::ErrorDetailFile::parse(), AnyP::Uri::parse(), Http::StatusLine::parse(), store_client::parseHttpHeadersFromDisk(), parseOneConfigFile(), Ssl::CertValidationMsg::parseResponse(), ConnStateData::parseTlsHandshake(), ErrorPage::BuildErrorPrinter::print(), processNewRequest(), Ssl::readCertAndPrivateKeyFromMemory(), store_client::readHeader(), Ipc::Port::receiveOrIgnore(), setTraceability(), SquidMainSafe(), CacheManager::start(), storeRebuildParseEntry(), Store::Controller::syncCollapsed(), CacheManagerInternals::testValidUrl(), Store::Controller::updateOnNotModified(), and wccp2HandleUdp().
◆ CurrentExceptionExtra()
std::ostream & CurrentExceptionExtra | ( | std::ostream & | os | ) |
If there is an active (i.e., thrown but not yet handled) exception, reports it on a dedicated DebugExtra line. Otherwise, does nothing.
Definition at line 99 of file TextException.cc.
References CurrentException_(), and Debug::Extra().
Referenced by OnTerminate().
◆ operator<<()
std::ostream & operator<< | ( | std::ostream & | os, |
const TextException & | ex | ||
) |
Definition at line 61 of file TextException.cc.
References TextException::print().