TextException.cc File Reference
#include "squid.h"
#include "base/TextException.h"
#include "sbuf/SBuf.h"
#include <iostream>
#include <sstream>
#include <unordered_map>
Include dependency graph for TextException.cc:

Go to the source code of this file.


typedef std::runtime_error WhatString
 a standard CoW string; avoids noise and circular dependencies of SBuf More...
typedef std::unordered_multimap< const void *, WhatStringWhatStrings
 a collection of strings indexed by pointers to their creator objects More...


std::ostream & operator<< (std::ostream &os, const TextException &ex)
 efficiently prints TextException More...
static std::ostream & CurrentException_ (std::ostream &os)
 prints the current exception (which presence has been verified by the caller) More...
std::ostream & CurrentException (std::ostream &os)
 prints active (i.e., thrown but not yet handled) exception More...
std::ostream & CurrentExceptionExtra (std::ostream &os)


static WhatStringsWhatStrings_ = nullptr
 requested what() strings of alive TextException objects More...

Typedef Documentation

◆ WhatString

typedef std::runtime_error WhatString

Definition at line 18 of file TextException.cc.

◆ WhatStrings

typedef std::unordered_multimap<const void*, WhatString> WhatStrings

Definition at line 21 of file TextException.cc.

Function Documentation

◆ CurrentException()

◆ CurrentException_()

static std::ostream & CurrentException_ ( std::ostream &  os)

Definition at line 70 of file TextException.cc.

References TextException::what().

Referenced by CurrentException(), and CurrentExceptionExtra().

◆ 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().

Variable Documentation

◆ WhatStrings_

WhatStrings* WhatStrings_ = nullptr

Definition at line 24 of file TextException.cc.

Referenced by TextException::~TextException(), and TextException::what().






Web Site Translations