CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
edm::Exception Class Reference

#include <EDMException.h>

Inheritance diagram for edm::Exception:
cms::Exception XrdAdaptor::XrootdException

Public Types

typedef errors::ErrorCodes Code
 

Public Member Functions

Code categoryCode () const
 
Exceptionclone () const override
 
 Exception (Code category)
 
 Exception (Code category, char const *message)
 
 Exception (Code category, char const *message, cms::Exception const &another)
 
 Exception (Code category, std::string const &message)
 
 Exception (Code category, std::string const &message, cms::Exception const &another)
 
 Exception (Exception const &other)
 
Exceptionoperator= (Exception const &other)
 
void swap (Exception &other)
 
 ~Exception () noexcept override
 
- Public Member Functions inherited from cms::Exception
void addAdditionalInfo (char const *info)
 
void addAdditionalInfo (std::string const &info)
 
void addContext (char const *context)
 
void addContext (std::string const &context)
 
std::list< std::string > const & additionalInfo () const
 
bool alreadyPrinted () const
 
void append (char const *more_information)
 
void append (Exception const &another)
 
void append (std::string const &more_information)
 
std::string const & category () const
 
void clearAdditionalInfo ()
 
void clearContext ()
 
void clearMessage ()
 
std::list< std::string > const & context () const
 
 Exception (char const *aCategory)
 
 Exception (char const *aCategory, char const *message)
 
 Exception (char const *aCategory, std::string const &message)
 
 Exception (Exception const &other)
 
 Exception (std::string const &aCategory)
 
 Exception (std::string const &aCategory, char const *message)
 
 Exception (std::string const &aCategory, std::string const &message)
 
 Exception (std::string const &aCategory, std::string const &message, Exception const &another)
 
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 (bool value)
 
void setContext (std::list< std::string > const &context)
 
void swap (Exception &other)
 
char const * what () const noexcept override
 
 ~Exception () noexcept override
 

Static Public Member Functions

static const std::string & codeToString (Code)
 -----------— implementation details ---------------— More...
 
static void throwThis (Code category, char const *message0, int intVal, char const *message2="")
 
static void throwThis (Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
 

Private Member Functions

void rethrow () override
 
int returnCode_ () const override
 

Private Attributes

Code category_
 

Detailed Description

Definition at line 77 of file EDMException.h.

Member Typedef Documentation

◆ Code

Definition at line 79 of file EDMException.h.

Constructor & Destructor Documentation

◆ Exception() [1/6]

Exception::Exception ( Code  category)
explicit

Definition at line 57 of file EDMException.cc.

57 : cms::Exception(codeToString(aCategory)), category_(aCategory) {}

Referenced by clone().

◆ Exception() [2/6]

Exception::Exception ( Code  category,
std::string const &  message 
)

Definition at line 59 of file EDMException.cc.

60  : cms::Exception(codeToString(aCategory), message), category_(aCategory) {}

◆ Exception() [3/6]

Exception::Exception ( Code  category,
char const *  message 
)

Definition at line 62 of file EDMException.cc.

63  : cms::Exception(codeToString(aCategory), std::string(message)), category_(aCategory) {}

◆ Exception() [4/6]

Exception::Exception ( Code  category,
std::string const &  message,
cms::Exception const &  another 
)

Definition at line 65 of file EDMException.cc.

66  : cms::Exception(codeToString(aCategory), message, another), category_(aCategory) {}

◆ Exception() [5/6]

Exception::Exception ( Code  category,
char const *  message,
cms::Exception const &  another 
)

Definition at line 68 of file EDMException.cc.

69  : cms::Exception(codeToString(aCategory), std::string(message), another), category_(aCategory) {}

◆ Exception() [6/6]

Exception::Exception ( Exception const &  other)

Definition at line 71 of file EDMException.cc.

71 : cms::Exception(other), category_(other.category_) {}

◆ ~Exception()

Exception::~Exception ( )
overridenoexcept

Definition at line 73 of file EDMException.cc.

73 {}

Member Function Documentation

◆ categoryCode()

Code edm::Exception::categoryCode ( ) const
inline

Definition at line 97 of file EDMException.h.

97 { return category_; }

◆ clone()

Exception * Exception::clone ( void  ) const
overridevirtual

Reimplemented from cms::Exception.

Definition at line 100 of file EDMException.cc.

100 { return new Exception(*this); }

References Exception().

◆ codeToString()

const std::string & Exception::codeToString ( Code  c)
static

-----------— implementation details ---------------—

Definition at line 52 of file EDMException.cc.

52  {
53  auto i(errors::codeMap.find(c));
54  return i != errors::codeMap.end() ? i->second : errors::kUnknownCode;
55  }

References c, edm::errors::codeMap, spr::find(), mps_fire::i, and edm::errors::kUnknownCode().

Referenced by edm::Path::handleWorkerFailure().

◆ operator=()

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

Definition at line 75 of file EDMException.cc.

75  {
77  this->swap(temp);
78  return *this;
79  }

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

◆ rethrow()

void Exception::rethrow ( )
overrideprivatevirtual

Reimplemented from cms::Exception.

Definition at line 102 of file EDMException.cc.

102 { throw *this; }

◆ returnCode_()

int Exception::returnCode_ ( ) const
overrideprivatevirtual

Reimplemented from cms::Exception.

Definition at line 81 of file EDMException.cc.

81 { return static_cast<int>(category_); }

References category_.

◆ swap()

void edm::Exception::swap ( Exception other)
inline

Definition at line 93 of file EDMException.h.

93 { std::swap(category_, other.category_); }

References trackingPlots::other, and std::swap().

Referenced by operator=().

◆ throwThis() [1/2]

void Exception::throwThis ( Code  category,
char const *  message0,
int  intVal,
char const *  message2 = "" 
)
static

Definition at line 94 of file EDMException.cc.

94  {
95  Exception e(aCategory, std::string(message0));
96  e << intVal << message1;
97  throw e;
98  }

References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ throwThis() [2/2]

void Exception::throwThis ( Code  category,
char const *  message0 = "",
char const *  message1 = "",
char const *  message2 = "",
char const *  message3 = "",
char const *  message4 = "" 
)
static

Definition at line 83 of file EDMException.cc.

88  {
89  Exception e(aCategory, std::string(message0));
90  e << message1 << message2 << message3 << message4;
91  throw e;
92  }

References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by edm::dsrvdetail::_throw_range(), edm::detail::_throw_range(), edm::eventsetup::ComponentFactory< T >::addTo(), edm::OwnArray< T, MAX_SIZE, P >::back(), edm::helpers::checkRef(), edm::reftobase::RefVectorHolder< REFV >::const_iterator_imp_specific::dc(), edm::reftobase::IndirectVectorHolder< T >::const_iterator_imp_specific::dc(), edm::reftobase::VectorHolder< T, REFV >::const_iterator_imp_specific::dc(), edm::detailsTrie::errorInsert(), edm::OwnArray< T, MAX_SIZE, P >::fillView(), edm::ServiceRegistry::get(), edm::serviceregistry::ServicesManager::get(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::get(), edm::Handle< GenericObject >::Handle(), edm::Handle< FWGenericObject >::Handle(), edm::OneToValue< BasicClusterCollection, float, unsigned short >::insert(), edm::OneToMany< std::vector< Trajectory >, std::vector< TrajectorySeed >, unsigned int >::insert(), edm::OneToOneGeneric< std::vector< TrackCandidate >, std::vector< Trajectory >, unsigned int >::insert(), edm::OneToManyWithQualityGeneric< TrackingParticleCollection, edm::View< reco::Track >, double >::insert(), edm::ServiceRegistry::isAvailable(), edm::reftobase::RefProdKey::key(), edm::makeRefTo(), edm::reftobase::InvalidHolderToVector< T, REF >::makeVectorHolder(), edm::reftobase::InvalidRefHolderToRefVector< REF >::makeVectorHolder(), edm::reftobase::RefVectorHolderBase::const_iterator::operator*(), edm::reftobase::RefVectorHolderBase::const_iterator::operator+(), edm::reftobase::RefVectorHolderBase::const_iterator::operator++(), edm::reftobase::RefVectorHolderBase::const_iterator::operator+=(), edm::reftobase::RefVectorHolderBase::const_iterator::operator-(), edm::reftobase::RefVectorHolderBase::const_iterator::operator--(), edm::reftobase::RefVectorHolderBase::const_iterator::operator-=(), edm::RefToBaseProd< T >::operator->(), edm::reftobase::RefVectorHolderBase::const_iterator::operator<(), edm::reftobase::RefVectorHolder< REFV >::push_back(), edm::reftobase::IndirectVectorHolder< T >::push_back(), edm::reftobase::VectorHolder< T, REFV >::push_back(), edm::detail::reallyfillPtrVector(), edm::detail::reallySetPtr(), edm::ESProducer::registerProduct(), edm::helper::Filler< Association< C > >::throwAdd(), edm::helper::Filler< Association< C > >::throwFillSize(), edm::ValueMap< math::XYZTLorentzVector >::throwIndexBound(), edm::Association< C >::throwIndexMapBound(), edm::reftobase::BaseVectorHolder< T >::const_iterator::throwInvalidReference(), edm::ValueMap< math::XYZTLorentzVector >::throwNotExisting(), and edm::Association< C >::throwRefSet().

Member Data Documentation

◆ category_

Code edm::Exception::category_
private

Definition at line 115 of file EDMException.h.

Referenced by returnCode_().

mps_fire.i
i
Definition: mps_fire.py:428
edm::Exception::category_
Code category_
Definition: EDMException.h:115
cms::Exception::message
std::string message() const
Definition: Exception.cc:145
edm::Exception::Exception
Exception(Code category)
Definition: EDMException.cc:57
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
edm::errors::kUnknownCode
static const std::string kUnknownCode("unknownCode")
trackingPlots.other
other
Definition: trackingPlots.py:1460
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::errors::codeMap
static const std::map< ErrorCodes, std::string > codeMap
Definition: EDMException.cc:9
Exception
edm::Exception::swap
void swap(Exception &other)
Definition: EDMException.h:93
edm::Exception::codeToString
static const std::string & codeToString(Code)
-----------— implementation details ---------------—
Definition: EDMException.cc:52
Exception
Definition: hltDiff.cc:245
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37