|
Squid Web Cache v8/master
|
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 | |
| #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 | |
| std::ostream & | CurrentExceptionExtra (std::ostream &) |
| std::ostream & | operator<< (std::ostream &, const TextException &) |
| efficiently prints TextException | |
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.
| #define Must3 | ( | condition, | |
| description, | |||
| location | |||
| ) | Assure_(3, (condition), ("check failed: " description), (location)) |
Like Must() but supports custom exception message and location.
| 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.
| #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.
| #define TexcHere | ( | msg | ) | TextException((msg), Here()) |
Definition at line 63 of file TextException.h.
| 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(), ConfigurationFailureMessage(), HttpStateData::decodeAndWriteReplyBody(), MemStore::get(), Security::KeyData::loadCertificates(), main(), mimeInit(), 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(), TerminationReason(), Store::Controller::updateOnNotModified(), and wccp2HandleUdp().
| 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().
| std::ostream & operator<< | ( | std::ostream & | os, |
| const TextException & | ex | ||
| ) |
Definition at line 61 of file TextException.cc.
References TextException::print().