CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
cms::Exception Class Reference

#include <Exception.h>

Inheritance diagram for cms::Exception:
Clustering1DException cond::persistency::Exception DetLayerException edm::eventsetup::MakeDataException edm::eventsetup::NoDataExceptionBase edm::eventsetup::NoRecordException< T > edm::Exception edm::MultipleException edm::ProductDeletedException edmNew::CapacityExaustedException LinPtException MeasurementDetException npstat::NpstatException popcon::Exception PropagationException RPCException StatisticsException StripClusterizerAlgorithm::InvalidChargeException TrajectoryStateException TritonException VertexException

Public Member Functions

void addAdditionalInfo (std::string const &info)
 
void addAdditionalInfo (char const *info)
 
void addContext (std::string const &context)
 
void addContext (char const *context)
 
std::list< std::string > const & additionalInfo () const
 
bool alreadyPrinted () const
 
void append (Exception const &another)
 
void append (std::string const &more_information)
 
void append (char const *more_information)
 
std::string const & category () const
 
void clearAdditionalInfo ()
 
void clearContext ()
 
void clearMessage ()
 
virtual Exceptionclone () const
 
std::list< std::string > const & context () const
 
 Exception (std::string const &aCategory)
 
 Exception (char const *aCategory)
 
 Exception (std::string const &aCategory, std::string const &message)
 
 Exception (char const *aCategory, std::string const &message)
 
 Exception (std::string const &aCategory, char const *message)
 
 Exception (char const *aCategory, char const *message)
 
 Exception (std::string const &aCategory, std::string const &message, Exception const &another)
 
 Exception (Exception const &other)
 
virtual std::string explainSelf () const
 
std::list< std::string > history () const
 
std::string message () const
 
Exceptionoperator= (Exception const &other)
 
void raise ()
 
int returnCode () const
 
void setAdditionalInfo (std::list< std::string > const &info)
 
void setAlreadyPrinted ()
 
void setContext (std::list< std::string > const &context)
 
void swap (Exception &other)
 
char const * what () const noexcept override
 
 ~Exception () noexcept override
 

Private Member Functions

void init (std::string const &message)
 
virtual void rethrow ()
 
virtual int returnCode_ () const
 

Private Attributes

std::list< std::string > additionalInfo_
 
std::atomic< bool > alreadyPrinted_
 
std::string category_
 
std::list< std::string > context_
 
std::ostringstream ost_
 
std::string what_
 

Friends

template<typename E , typename T >
detail::Desired< E, detail::is_derived_or_same< Exception, std::remove_reference_t< E > >::value >::typeoperator<< (E &&e, T const &stuff)
 
template<typename E >
detail::Desired< E, detail::is_derived_or_same< Exception, std::remove_reference_t< E > >::value >::typeoperator<< (E &&e, std::ostream &(*f)(std::ostream &))
 
template<typename E >
detail::Desired< E, detail::is_derived_or_same< Exception, std::remove_reference_t< E > >::value >::typeoperator<< (E &&e, std::ios_base &(*f)(std::ios_base &))
 

Detailed Description

Definition at line 71 of file Exception.h.

Constructor & Destructor Documentation

◆ Exception() [1/8]

Exception::Exception ( std::string const &  aCategory)
explicit

Definition at line 6 of file Exception.cc.

Referenced by clone().

7  : std::exception(), ost_(), category_(aCategory), what_(), context_(), additionalInfo_(), alreadyPrinted_(false) {}
std::list< std::string > additionalInfo_
Definition: Exception.h:190
std::ostringstream ost_
Definition: Exception.h:185
std::string category_
Definition: Exception.h:186
std::atomic< bool > alreadyPrinted_
Definition: Exception.h:191
std::list< std::string > context_
Definition: Exception.h:189
std::string what_
Definition: Exception.h:188

◆ Exception() [2/8]

Exception::Exception ( char const *  aCategory)
explicit

Definition at line 9 of file Exception.cc.

10  : std::exception(),
11  ost_(),
12  category_(std::string(aCategory)),
13  what_(),
14  context_(),
16  alreadyPrinted_(false) {}
std::list< std::string > additionalInfo_
Definition: Exception.h:190
std::ostringstream ost_
Definition: Exception.h:185
std::string category_
Definition: Exception.h:186
std::atomic< bool > alreadyPrinted_
Definition: Exception.h:191
std::list< std::string > context_
Definition: Exception.h:189
std::string what_
Definition: Exception.h:188

◆ Exception() [3/8]

Exception::Exception ( std::string const &  aCategory,
std::string const &  message 
)

Definition at line 18 of file Exception.cc.

References init(), and message().

19  : std::exception(), ost_(), category_(aCategory), what_(), context_(), additionalInfo_(), alreadyPrinted_(false) {
20  init(message);
21  }
std::list< std::string > additionalInfo_
Definition: Exception.h:190
std::ostringstream ost_
Definition: Exception.h:185
std::string category_
Definition: Exception.h:186
std::string message() const
Definition: Exception.cc:149
std::atomic< bool > alreadyPrinted_
Definition: Exception.h:191
std::list< std::string > context_
Definition: Exception.h:189
std::string what_
Definition: Exception.h:188
void init(std::string const &message)
Definition: Exception.cc:50

◆ Exception() [4/8]

Exception::Exception ( char const *  aCategory,
std::string const &  message 
)

Definition at line 23 of file Exception.cc.

References init(), and message().

24  : std::exception(),
25  ost_(),
26  category_(std::string(aCategory)),
27  what_(),
28  context_(),
30  alreadyPrinted_(false) {
31  init(message);
32  }
std::list< std::string > additionalInfo_
Definition: Exception.h:190
std::ostringstream ost_
Definition: Exception.h:185
std::string category_
Definition: Exception.h:186
std::string message() const
Definition: Exception.cc:149
std::atomic< bool > alreadyPrinted_
Definition: Exception.h:191
std::list< std::string > context_
Definition: Exception.h:189
std::string what_
Definition: Exception.h:188
void init(std::string const &message)
Definition: Exception.cc:50

◆ Exception() [5/8]

Exception::Exception ( std::string const &  aCategory,
char const *  message 
)

Definition at line 34 of file Exception.cc.

References init(), message(), and AlCaHLTBitMon_QueryRunRegistry::string.

35  : std::exception(), ost_(), category_(aCategory), what_(), context_(), additionalInfo_(), alreadyPrinted_(false) {
37  }
std::list< std::string > additionalInfo_
Definition: Exception.h:190
std::ostringstream ost_
Definition: Exception.h:185
std::string category_
Definition: Exception.h:186
std::string message() const
Definition: Exception.cc:149
std::atomic< bool > alreadyPrinted_
Definition: Exception.h:191
std::list< std::string > context_
Definition: Exception.h:189
std::string what_
Definition: Exception.h:188
void init(std::string const &message)
Definition: Exception.cc:50

◆ Exception() [6/8]

Exception::Exception ( char const *  aCategory,
char const *  message 
)

Definition at line 39 of file Exception.cc.

References init(), message(), and AlCaHLTBitMon_QueryRunRegistry::string.

40  : std::exception(),
41  ost_(),
42  category_(std::string(aCategory)),
43  what_(),
44  context_(),
46  alreadyPrinted_(false) {
48  }
std::list< std::string > additionalInfo_
Definition: Exception.h:190
std::ostringstream ost_
Definition: Exception.h:185
std::string category_
Definition: Exception.h:186
std::string message() const
Definition: Exception.cc:149
std::atomic< bool > alreadyPrinted_
Definition: Exception.h:191
std::list< std::string > context_
Definition: Exception.h:189
std::string what_
Definition: Exception.h:188
void init(std::string const &message)
Definition: Exception.cc:50

◆ Exception() [7/8]

Exception::Exception ( std::string const &  aCategory,
std::string const &  message,
Exception const &  another 
)

Definition at line 59 of file Exception.cc.

References append(), message(), and ost_.

60  : std::exception(),
61  ost_(),
62  category_(aCategory),
63  what_(),
64  context_(another.context()),
65  additionalInfo_(another.additionalInfo()),
66  alreadyPrinted_(false) {
67  ost_ << message;
68  // check for newline at end of message first
69  if (!message.empty() && message[message.size() - 1] != '\n') {
70  ost_ << "\n";
71  }
72  append(another);
73  }
std::list< std::string > additionalInfo_
Definition: Exception.h:190
void append(Exception const &another)
Definition: Exception.cc:157
std::ostringstream ost_
Definition: Exception.h:185
std::string category_
Definition: Exception.h:186
std::string message() const
Definition: Exception.cc:149
std::atomic< bool > alreadyPrinted_
Definition: Exception.h:191
std::list< std::string > context_
Definition: Exception.h:189
std::string what_
Definition: Exception.h:188

◆ Exception() [8/8]

Exception::Exception ( Exception const &  other)

Definition at line 75 of file Exception.cc.

References ost_, and trackingPlots::other.

76  : std::exception(),
77  ost_(),
78  category_(other.category_),
79  what_(other.what_),
80  context_(other.context_),
81  additionalInfo_(other.additionalInfo_),
82  alreadyPrinted_(other.alreadyPrinted_.load()) {
83  ost_ << other.ost_.str();
84  }
std::list< std::string > additionalInfo_
Definition: Exception.h:190
std::ostringstream ost_
Definition: Exception.h:185
std::string category_
Definition: Exception.h:186
std::atomic< bool > alreadyPrinted_
Definition: Exception.h:191
std::list< std::string > context_
Definition: Exception.h:189
std::string what_
Definition: Exception.h:188

◆ ~Exception()

Exception::~Exception ( )
overridenoexcept

Definition at line 86 of file Exception.cc.

86 {}

Member Function Documentation

◆ addAdditionalInfo() [1/2]

void Exception::addAdditionalInfo ( std::string const &  info)

◆ addAdditionalInfo() [2/2]

void Exception::addAdditionalInfo ( char const *  info)

Definition at line 175 of file Exception.cc.

References additionalInfo_, info(), and AlCaHLTBitMon_QueryRunRegistry::string.

175 { additionalInfo_.push_back(std::string(info)); }
std::list< std::string > additionalInfo_
Definition: Exception.h:190
static const TGPicture * info(bool iBackgroundIsBlack)

◆ addContext() [1/2]

void Exception::addContext ( std::string const &  context)

Definition at line 169 of file Exception.cc.

References context(), and context_.

Referenced by edm::storage::DavixFile::abort(), edm::ThinnedAssociationsHelper::addAssociation(), edm::addContextAndPrintException(), edm::UnscheduledCallProducer::addContextToException(), edm::ProductRegistry::addElementTypesForAliases(), edm::eventsetup::ComponentFactory< T >::addTo(), edm::eventsetup::ComponentMaker< edm::eventsetup::LooperMakerTraits, TType >::addTo(), edm::eventsetup::EventSetupRecordImpl::addTraceInfoToCmsException(), edm::eventsetup::EventSetupRecord::addTraceInfoToCmsException(), L1GlobalTriggerObjectMaps::algorithmResult(), L1GlobalTriggerObjectMaps::AlgorithmResult::AlgorithmResult(), CompareToObjectMapRecord::analyze(), edm::EventProcessor::beginJob(), edm::Worker::beginJob(), edm::Worker::beginStream(), edm::storage::LocalCacheFile::cache(), edm::storage::DavixStorageMaker::check(), ALPAKA_ACCELERATOR_NAMESPACE::detail::chooseDevice(), cms::cuda::chooseDevice(), cms::alpakatools::chooseDevice(), edm::storage::DavixFile::close(), L1GlobalTriggerObjectMaps::consistencyCheck(), edm::serviceregistry::ServicesManager::createServiceFor(), edm::service::SiteLocalConfigService::dataCatalogs(), edm::eventsetup::ESSourceProductResolverBase::doPrefetchAndSignals(), edm::Worker::endJob(), edm::Worker::endStream(), edm::exceptionContext(), edm::Path::exceptionContext(), edm::Schedule::fillModuleAndConsumesInfo(), edm::InputFileCatalog::findFile(), edm::StreamSchedule::finishedPaths(), edm::storage::XrdFile::getActiveFile(), XrdAdaptor::RequestManager::getActiveFile(), L1GlobalTriggerObjectMaps::getCombinationsInCondition(), L1GlobalTriggerObjectMaps::ConditionsInAlgorithm::getConditionResult(), L1GlobalTriggerObjectMaps::CombinationsInCondition::getObjectIndex(), edm::eventsetup::DependentRecordImplementation< EcalMappingRcd, edm::mpl::Vector< EcalMappingElectronicsRcd > >::getRecord(), L1GlobalTriggerObjectMaps::getStartEndIndex(), fwlite::DataGetterHelper::getThinnedKeyFrom(), BareRootProductGetter::getThinnedKeyFrom(), edm::EventPrincipal::getThinnedKeyFrom(), edm::shared_memory::WriteBuffer::growBuffer(), XrdAdaptor::Source::handle(), XrdAdaptor::RequestManager::handle(), XrdAdaptor::ClientRequest::HandleResponse(), XrdAdaptor::RequestManager::OpenHandler::HandleResponseWithHosts(), edm::FileLocator::init(), edm::InputFileCatalog::init(), edm::BranchDescription::initFromDictionary(), XrdAdaptor::RequestManager::initialize(), edm::RootInputFileSequence::initTheFile(), l1t::L1TGlobalUtilHelper::L1TGlobalUtilHelper(), edm::storage::LocalCacheFile::LocalCacheFile(), edm::eventsetup::CallbackExternalWork< T, TAcquireFunc, TAcquireReturn, TProduceFunc, TProduceReturn, TRecord, TDecorator >::makeAcquireTask(), edm::makeInput(), nowrite(), edm::storage::DavixFile::open(), edm::storage::DCacheFile::open(), edm::storage::XrdFile::open(), XrdAdaptor::RequestManager::OpenHandler::open(), edm::StreamerInputFile::openStreamerFile(), operator<<(), edm::service::SiteLocalConfigService::parse(), XrdAdaptor::RequestManager::pickSingleSource(), edm::storage::DavixFile::position(), edm::storage::DCacheFile::position(), edm::storage::XrdFile::position(), ConvertObjectMapRecord::produce(), edm::storage::DavixFile::read(), edm::storage::DCacheFile::read(), edm::storage::XrdFile::read(), DQMTTreeIO::TreeObjectReader< T >::read(), edm::StreamerInputFile::readBytes(), DQMRootSource::readFile_(), edm::storage::DCacheFile::readv(), edm::storage::DavixFile::readv(), edm::storage::XrdFile::readv(), edm::Worker::registerThinnedAssociations(), XrdAdaptor::RequestManager::requestFailure(), edm::storage::DavixFile::resize(), edm::storage::XrdFile::resize(), tensorflow::Options::setBackend(), edm::storage::XrdStorageMaker::setDebugLevel(), edm::StreamerInputFile::skipBytes(), XrdAdaptor::RequestManager::splitClientRequest(), edm::storage::DCacheStorageMaker::stagein(), edm::service::SiteLocalConfigService::storageDescriptionPath(), edm::Maker::throwConfigurationException(), throwStorageError(), edm::Maker::throwValidationException(), cms::alpakatools::toBackend(), cms::alpakatools::toString(), edm::service::SiteLocalConfigService::trivialDataCatalogs(), L1GlobalTriggerObjectMaps::updateOperandTokenVector(), edm::validateTopLevelParameterSets(), edm::storage::DavixFile::write(), edm::storage::DCacheFile::write(), edm::storage::XrdFile::write(), edm::ConfigurationDescriptions::writeCfiForLabel(), and edm::RootOutputFile::writeIndexIntoFile().

169 { context_.push_back(context); }
std::list< std::string > context_
Definition: Exception.h:189
std::list< std::string > const & context() const
Definition: Exception.cc:151

◆ addContext() [2/2]

void Exception::addContext ( char const *  context)

Definition at line 171 of file Exception.cc.

References context(), context_, and AlCaHLTBitMon_QueryRunRegistry::string.

171 { context_.push_back(std::string(context)); }
std::list< std::string > context_
Definition: Exception.h:189
std::list< std::string > const & context() const
Definition: Exception.cc:151

◆ additionalInfo()

std::list< std::string > const & Exception::additionalInfo ( ) const

Definition at line 153 of file Exception.cc.

References additionalInfo_.

153 { return additionalInfo_; }
std::list< std::string > additionalInfo_
Definition: Exception.h:190

◆ alreadyPrinted()

bool Exception::alreadyPrinted ( ) const

Definition at line 181 of file Exception.cc.

References alreadyPrinted_.

181 { return alreadyPrinted_.load(); }
std::atomic< bool > alreadyPrinted_
Definition: Exception.h:191

◆ append() [1/3]

void Exception::append ( Exception const &  another)

◆ append() [2/3]

void Exception::append ( std::string const &  more_information)

Definition at line 159 of file Exception.cc.

References ost_.

Referenced by diclist.diclist::add().

159 { ost_ << more_information; }
std::ostringstream ost_
Definition: Exception.h:185

◆ append() [3/3]

void Exception::append ( char const *  more_information)

Definition at line 161 of file Exception.cc.

References ost_.

Referenced by diclist.diclist::add().

161 { ost_ << more_information; }
std::ostringstream ost_
Definition: Exception.h:185

◆ category()

std::string const & Exception::category ( void  ) const

◆ clearAdditionalInfo()

void Exception::clearAdditionalInfo ( )

Definition at line 167 of file Exception.cc.

References additionalInfo_.

Referenced by XrdAdaptor::RequestManager::initialize().

167 { additionalInfo_.clear(); }
std::list< std::string > additionalInfo_
Definition: Exception.h:190

◆ clearContext()

void Exception::clearContext ( )

Definition at line 165 of file Exception.cc.

References context_.

Referenced by XrdAdaptor::RequestManager::initialize().

165 { context_.clear(); }
std::list< std::string > context_
Definition: Exception.h:189

◆ clearMessage()

void Exception::clearMessage ( )

Definition at line 163 of file Exception.cc.

References ost_.

Referenced by XrdAdaptor::RequestManager::initialize(), and edm::StreamerInputFile::openStreamerFile().

163 { ost_.str(""); }
std::ostringstream ost_
Definition: Exception.h:185

◆ clone()

Exception * Exception::clone ( void  ) const
virtual

Reimplemented in edm::Exception, and edm::MultipleException.

Definition at line 185 of file Exception.cc.

References Exception().

Referenced by edm::ExceptionCollector::call(), and edm::Path::workerFinished().

185 { return new Exception(*this); }
Exception(std::string const &aCategory)
Definition: Exception.cc:6

◆ context()

std::list< std::string > const & Exception::context ( ) const

◆ explainSelf()

std::string Exception::explainSelf ( ) const
virtual

Definition at line 112 of file Exception.cc.

References additionalInfo_, HltBtagPostValidation_cff::c, category_, context_, submitPVResolutionJobs::count, mps_fire::i, ost_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by edm::ExceptionCollector::call(), TritonException::convertToWarning(), L1GtUtils::LogicalExpressionL1Results::initialize(), CachedTrajectory::propagate(), TrajectoryStateClosestToPoint::TrajectoryStateClosestToPoint(), and what().

112  {
113  std::ostringstream ost;
114 
115  if (context_.empty()) {
116  ost << "An exception of category '" << category_ << "' occurred.\n";
117  } else {
118  ost << "An exception of category '" << category_ << "' occurred while\n";
119  int count = 0;
120  for (std::list<std::string>::const_reverse_iterator i = context_.rbegin(), iEnd = context_.rend(); i != iEnd;
121  ++i, ++count) {
122  ost << " [" << count << "] " << *i << "\n";
123  }
124  }
125 
126  std::string centralMessage(ost_.str());
127  if (!centralMessage.empty()) {
128  ost << "Exception Message:\n";
129  ost << centralMessage;
130  if (centralMessage[centralMessage.size() - 1] != '\n') {
131  ost << "\n";
132  }
133  }
134 
135  if (!additionalInfo_.empty()) {
136  ost << " Additional Info:\n";
137  char c = 'a';
138  for (std::list<std::string>::const_reverse_iterator i = additionalInfo_.rbegin(), iEnd = additionalInfo_.rend();
139  i != iEnd;
140  ++i, ++c) {
141  ost << " [" << c << "] " << *i << "\n";
142  }
143  }
144  return ost.str();
145  }
std::list< std::string > additionalInfo_
Definition: Exception.h:190
std::ostringstream ost_
Definition: Exception.h:185
std::string category_
Definition: Exception.h:186
std::list< std::string > context_
Definition: Exception.h:189

◆ history()

std::list< std::string > Exception::history ( ) const

Definition at line 191 of file Exception.cc.

References category_.

191  {
192  std::list<std::string> returnValue;
193  returnValue.push_back(category_);
194  return returnValue;
195  }
std::string category_
Definition: Exception.h:186

◆ init()

void Exception::init ( std::string const &  message)
private

Definition at line 50 of file Exception.cc.

References message(), and ost_.

Referenced by Exception().

50  {
51  ost_ << message;
52  if (!message.empty()) {
53  unsigned sz = message.size() - 1;
54  if (message[sz] != '\n' && message[sz] != ' ')
55  ost_ << " ";
56  }
57  }
std::ostringstream ost_
Definition: Exception.h:185
std::string message() const
Definition: Exception.cc:149

◆ message()

std::string Exception::message ( ) const

Definition at line 149 of file Exception.cc.

References ost_.

Referenced by append(), edm::eventsetup::NoDataExceptionBase::constructMessage(), Exception(), and init().

149 { return ost_.str(); }
std::ostringstream ost_
Definition: Exception.h:185

◆ operator=()

Exception & Exception::operator= ( Exception const &  other)

Definition at line 101 of file Exception.cc.

References trackingPlots::other, swap(), and groupFilesInBlocks::temp.

101  {
103  this->swap(temp);
104  return *this;
105  }
void swap(Exception &other)
Definition: Exception.cc:88

◆ raise()

void cms::Exception::raise ( )
inline

Definition at line 102 of file Exception.h.

Referenced by HLTBTagHarvestingAnalyzer::GetNumDenumerators().

102 { rethrow(); }
virtual void rethrow()
Definition: Exception.cc:187

◆ rethrow()

void Exception::rethrow ( )
privatevirtual

Reimplemented in edm::Exception.

Definition at line 187 of file Exception.cc.

187 { throw *this; }

◆ returnCode()

int Exception::returnCode ( ) const

Definition at line 155 of file Exception.cc.

References returnCode_().

Referenced by edm::addContextAndPrintException(), and edm::ExceptionCollector::call().

155 { return returnCode_(); }
virtual int returnCode_() const
Definition: Exception.cc:189

◆ returnCode_()

int Exception::returnCode_ ( ) const
privatevirtual

Reimplemented in edm::Exception, and edm::MultipleException.

Definition at line 189 of file Exception.cc.

Referenced by returnCode().

189 { return 8001; }

◆ setAdditionalInfo()

void Exception::setAdditionalInfo ( std::list< std::string > const &  info)

Definition at line 179 of file Exception.cc.

References additionalInfo_, and info().

179 { additionalInfo_ = info; }
std::list< std::string > additionalInfo_
Definition: Exception.h:190
static const TGPicture * info(bool iBackgroundIsBlack)

◆ setAlreadyPrinted()

void Exception::setAlreadyPrinted ( )

Definition at line 183 of file Exception.cc.

References alreadyPrinted_.

Referenced by edm::addContextAndPrintException().

183 { alreadyPrinted_.exchange(true); }
std::atomic< bool > alreadyPrinted_
Definition: Exception.h:191

◆ setContext()

void Exception::setContext ( std::list< std::string > const &  context)

Definition at line 177 of file Exception.cc.

References context(), and context_.

177 { context_ = context; }
std::list< std::string > context_
Definition: Exception.h:189
std::list< std::string > const & context() const
Definition: Exception.cc:151

◆ swap()

void Exception::swap ( Exception other)

Definition at line 88 of file Exception.cc.

References additionalInfo_, alreadyPrinted_, category_, context_, ost_, trackingPlots::other, groupFilesInBlocks::temp, and what_.

Referenced by operator=().

88  {
89  ost_ << other.ost_.str();
90  category_.swap(other.category_);
91  what_.swap(other.what_);
92  context_.swap(other.context_);
93  additionalInfo_.swap(other.additionalInfo_);
94  // It is not possible to atomically swap atomics
95  // This should be good enough for current use cases.
96  bool temp = alreadyPrinted_.load();
97  alreadyPrinted_ = other.alreadyPrinted_.load();
98  other.alreadyPrinted_ = temp;
99  }
std::list< std::string > additionalInfo_
Definition: Exception.h:190
std::ostringstream ost_
Definition: Exception.h:185
std::string category_
Definition: Exception.h:186
std::atomic< bool > alreadyPrinted_
Definition: Exception.h:191
std::list< std::string > context_
Definition: Exception.h:189
std::string what_
Definition: Exception.h:188

◆ what()

char const * Exception::what ( ) const
overridenoexcept

Definition at line 107 of file Exception.cc.

References explainSelf(), and what_.

Referenced by L1CondDBPayloadWriterExt::analyze(), SiStripDetVOffFakeBuilder::analyze(), SiPixelLorentzAngleDBLoader::analyze(), SiPixelVCalDB::analyze(), SiPixelLorentzAngleDB::analyze(), SiPixelDynamicInefficiencyDB::analyze(), DiMuonVertexMonitor::analyze(), L1CondDBPayloadWriter::analyze(), cms::SiPixelCondObjBuilder::analyze(), cms::SiPixelCondObjForHLTBuilder::analyze(), cms::SiPixelCondObjOfflineBuilder::analyze(), PrimaryVertexValidation::analyze(), FWPFCandidateDetailView::build(), FWPFPatJet3DProxyBuilder< reco::PFJet >::build(), FWPFCandidateDetailView::buildGLEventScene(), magneticfield::MagGeoBuilder::buildInterpolator(), MagGeoBuilderFromDDD::buildInterpolator(), SiPixelGainCalibScaler::computeAndStorePalyoads(), SiStripLorentzAnglePCLHarvester::dqmEndJob(), SiPixelLorentzAnglePCLHarvester::dqmEndJob(), SiPixelLorentzAnglePCLHarvesterMCS::dqmEndJob(), FWModelChangeManager::endChanges(), edm::shared_memory::WriteBuffer::growBuffer(), edm::MessageLoggerQ::handshakedCommand(), L1GtUtils::LogicalExpressionL1Results::initialize(), PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::inspect(), main(), Vx3DHLTAnalyzer::MyFit(), cond::XMLAuthenticationService::XMLAuthenticationService::processFile(), PhotonConversionTrajectorySeedProducerFromQuadruplets::produce(), CaloTruthCellsProducer::produce(), edm::storage::XrdFile::readv(), and DTCalibDBUtils::writeToDB().

107  {
108  what_ = explainSelf();
109  return what_.c_str();
110  }
virtual std::string explainSelf() const
Definition: Exception.cc:112
std::string what_
Definition: Exception.h:188

Friends And Related Function Documentation

◆ operator<< [1/3]

template<typename E , typename T >
detail::Desired<E, detail::is_derived_or_same<Exception, std::remove_reference_t<E> >::value>::type& operator<< ( E &&  e,
T const &  stuff 
)
friend

Definition at line 203 of file Exception.h.

203  {
204  e.ost_ << stuff;
205  return e;
206  }

◆ operator<< [2/3]

template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception, std::remove_reference_t<E> >::value>::type& operator<< ( E &&  e,
std::ostream &(*)(std::ostream &)  f 
)
friend

Definition at line 210 of file Exception.h.

210  {
211  f(e.ost_);
212  return e;
213  }
double f[11][100]

◆ operator<< [3/3]

template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception, std::remove_reference_t<E> >::value>::type& operator<< ( E &&  e,
std::ios_base &(*)(std::ios_base &)  f 
)
friend

Definition at line 217 of file Exception.h.

217  {
218  f(e.ost_);
219  return e;
220  }
double f[11][100]

Member Data Documentation

◆ additionalInfo_

std::list<std::string> cms::Exception::additionalInfo_
private

◆ alreadyPrinted_

std::atomic<bool> cms::Exception::alreadyPrinted_
private

Definition at line 191 of file Exception.h.

Referenced by alreadyPrinted(), setAlreadyPrinted(), and swap().

◆ category_

std::string cms::Exception::category_
private

Definition at line 186 of file Exception.h.

Referenced by category(), explainSelf(), history(), and swap().

◆ context_

std::list<std::string> cms::Exception::context_
private

Definition at line 189 of file Exception.h.

Referenced by addContext(), clearContext(), context(), explainSelf(), setContext(), and swap().

◆ ost_

std::ostringstream cms::Exception::ost_
private

Definition at line 185 of file Exception.h.

Referenced by append(), clearMessage(), Exception(), explainSelf(), init(), message(), and swap().

◆ what_

std::string cms::Exception::what_
mutableprivate

Definition at line 188 of file Exception.h.

Referenced by swap(), and what().