13 alreadyPrinted_(
false)
20 category_(std::string(aCategory)),
24 alreadyPrinted_(
false)
36 alreadyPrinted_(
false)
45 category_(std::string(aCategory)),
49 alreadyPrinted_(
false)
63 alreadyPrinted_(
false)
65 init(std::string(message));
73 category_(std::string(aCategory)),
77 alreadyPrinted_(
false)
79 init(std::string(message));
84 if(!message.empty()) {
85 unsigned sz = message.size()-1;
86 if(message[sz] !=
'\n' && message[sz] !=
' ')
ost_ <<
" ";
97 context_(another.context()),
98 additionalInfo_(another.additionalInfo()),
99 alreadyPrinted_(
false)
103 if(!message.empty() && message[message.size()-1]!=
'\n') {
112 category_(other.category_),
114 context_(other.context_),
115 additionalInfo_(other.additionalInfo_),
116 alreadyPrinted_(other.alreadyPrinted_)
143 return what_.c_str();
147 std::ostringstream ost;
150 ost <<
"An exception of category '" <<
category_ <<
"' occurred.\n";
153 ost <<
"An exception of category '" <<
category_ <<
"' occurred while\n";
155 for (std::list<std::string>::const_reverse_iterator
i =
context_.rbegin(),
158 ost <<
" [" << count <<
"] " << *
i <<
"\n";
162 std::string centralMessage(
ost_.str());
163 if (!centralMessage.empty()) {
164 ost <<
"Exception Message:\n";
165 ost << centralMessage;
166 if (centralMessage[centralMessage.size() - 1] !=
'\n') {
172 ost <<
" Additional Info:\n";
174 for (std::list<std::string>::const_reverse_iterator
i =
additionalInfo_.rbegin(),
176 i != iEnd; ++
i, ++
c) {
177 ost <<
" [" << c <<
"] " << *
i <<
"\n";
208 ost_ << more_information;
212 ost_ << more_information;
232 context_.push_back(std::string(context));
272 std::list<std::string> returnValue;
virtual char const * what() const
void setAlreadyPrinted(bool value)
std::list< std::string > additionalInfo_
void append(Exception const &another)
virtual std::string explainSelf() const
void setContext(std::list< std::string > const &context)
std::string const & category() const
std::string message() const
void setAdditionalInfo(std::list< std::string > const &info)
bool alreadyPrinted() const
std::list< std::string > const & additionalInfo() const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::list< std::string > const & context() const
virtual int returnCode_() const
Exception & operator=(Exception const &other)
void addAdditionalInfo(std::string const &info)
std::list< std::string > history() const
void addContext(std::string const &context)
Exception(std::string const &aCategory)
std::list< std::string > context_
void init(std::string const &message)
void clearAdditionalInfo()
void swap(Exception &other)
virtual Exception * clone() const