CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

Public Types

typedef errors::ErrorCodes Code
 
typedef std::map< Code,
std::string > 
CodeMap
 

Public Member Functions

Code categoryCode () const
 
virtual Exceptionclone () const
 
 Exception (Code category)
 
 Exception (Code category, std::string const &message)
 
 Exception (Code category, char const *message)
 
 Exception (Code category, std::string const &message, cms::Exception const &another)
 
 Exception (Code category, char const *message, cms::Exception const &another)
 
 Exception (Exception const &other)
 
Exceptionoperator= (Exception const &other)
 
void swap (Exception &other)
 
virtual ~Exception () throw ()
 
- Public Member Functions inherited from cms::Exception
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 ()
 
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 (bool value)
 
void setContext (std::list< std::string > const &context)
 
void swap (Exception &other)
 
virtual char const * what () const throw ()
 

Static Public Member Functions

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

Private Member Functions

virtual void rethrow ()
 
virtual int returnCode_ () const
 

Private Attributes

Code category_
 

Detailed Description

Definition at line 76 of file EDMException.h.

Member Typedef Documentation

Definition at line 78 of file EDMException.h.

typedef std::map<Code, std::string> edm::Exception::CodeMap

Definition at line 102 of file EDMException.h.

Constructor & Destructor Documentation

Exception::Exception ( Code  category)
explicit

Definition at line 64 of file EDMException.cc.

Referenced by clone().

64  :
65  cms::Exception(codeToString(aCategory)),
66  category_(aCategory) {
67  }
static std::string codeToString(Code)
-----------— implementation details ---------------—
Definition: EDMException.cc:56
Exception::Exception ( Code  category,
std::string const &  message 
)

Definition at line 69 of file EDMException.cc.

69  :
71  category_(aCategory) {
72  }
std::string message() const
Definition: Exception.cc:187
static std::string codeToString(Code)
-----------— implementation details ---------------—
Definition: EDMException.cc:56
Exception::Exception ( Code  category,
char const *  message 
)

Definition at line 74 of file EDMException.cc.

74  :
76  category_(aCategory) {
77  }
std::string message() const
Definition: Exception.cc:187
static std::string codeToString(Code)
-----------— implementation details ---------------—
Definition: EDMException.cc:56
Exception::Exception ( Code  category,
std::string const &  message,
cms::Exception const &  another 
)

Definition at line 79 of file EDMException.cc.

79  :
80  cms::Exception(codeToString(aCategory),message,another),
81  category_(aCategory) {
82  }
std::string message() const
Definition: Exception.cc:187
static std::string codeToString(Code)
-----------— implementation details ---------------—
Definition: EDMException.cc:56
Exception::Exception ( Code  category,
char const *  message,
cms::Exception const &  another 
)

Definition at line 84 of file EDMException.cc.

84  :
85  cms::Exception(codeToString(aCategory), std::string(message), another),
86  category_(aCategory) {
87  }
std::string message() const
Definition: Exception.cc:187
static std::string codeToString(Code)
-----------— implementation details ---------------—
Definition: EDMException.cc:56
Exception::Exception ( Exception const &  other)

Definition at line 89 of file EDMException.cc.

89  :
90  cms::Exception(other),
91  category_(other.category_) {
92  }
Exception::~Exception ( )
throw (
)
virtual

Reimplemented from cms::Exception.

Definition at line 94 of file EDMException.cc.

94  {
95  }

Member Function Documentation

Code edm::Exception::categoryCode ( ) const
inline
Exception * Exception::clone ( void  ) const
virtual

Reimplemented from cms::Exception.

Definition at line 128 of file EDMException.cc.

References Exception().

128  {
129  return new Exception(*this);
130  }
Exception(Code category)
Definition: EDMException.cc:64
std::string Exception::codeToString ( Code  c)
static

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

Definition at line 56 of file EDMException.cc.

References edm::getCodeTable(), i, AlCaHLTBitMon_QueryRunRegistry::string, and edmStreamStallGrapher::trans.

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

56  {
57  extern void getCodeTable(CodeMap*&);
58  CodeMap* trans;
59  getCodeTable(trans);
60  CodeMap::const_iterator i(trans->find(c));
61  return i!=trans->end() ? i->second : std::string("UnknownCode");
62  }
int i
Definition: DBlmapReader.cc:9
void getCodeTable(Exception::CodeMap *&setme)
Definition: EDMException.cc:49
std::map< Code, std::string > CodeMap
Definition: EDMException.h:102
Exception & Exception::operator= ( Exception const &  other)

Definition at line 98 of file EDMException.cc.

References swap(), and groupFilesInBlocks::temp.

98  {
99  Exception temp(other);
100  this->swap(temp);
101  return *this;
102  }
void swap(Exception &other)
Definition: EDMException.h:92
void Exception::rethrow ( )
privatevirtual

Reimplemented from cms::Exception.

Definition at line 133 of file EDMException.cc.

133  {
134  throw *this;
135  }
int Exception::returnCode_ ( ) const
privatevirtual

Reimplemented from cms::Exception.

Definition at line 105 of file EDMException.cc.

References category_.

105  {
106  return static_cast<int>(category_);
107  }
void edm::Exception::swap ( Exception other)
inline

Definition at line 92 of file EDMException.h.

References std::swap().

Referenced by operator=().

92  {
93  std::swap(category_, other.category_);
94  }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
void Exception::throwThis ( Code  category,
char const *  message0 = "",
char const *  message1 = "",
char const *  message2 = "",
char const *  message3 = "",
char const *  message4 = "" 
)
static

Definition at line 110 of file EDMException.cc.

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

Referenced by edm::lazydetail::_throw_range(), edm::dslvdetail::_throw_range(), edm::dsrvdetail::_throw_range(), edm::detail::_throw_range(), edm::eventsetup::ComponentFactory< T >::addTo(), edm::RefToBaseVector< T >::at(), edm::OwnVector< T, P >::back(), edm::RefToBase< T >::castTo(), 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, REFVECTOR >::const_iterator_imp_specific::dc(), edm::detailsTrie::errorInsert(), edm::OwnVector< T, P >::fillView(), edm::ServiceRegistry::get(), edm::serviceregistry::ServicesManager::get(), edm::Handle< GenericObject >::Handle(), edm::Handle< FWGenericObject >::Handle(), edm::OneToValue< reco::CaloJetCollection, reco::L2TauIsolationInfo >::insert(), edm::OneToMany< reco::TrackJetCollection, reco::TrackCollection >::insert(), edm::OneToOneGeneric< std::vector< TrackCandidate >, std::vector< Trajectory >, unsigned int >::insert(), edm::OneToManyWithQualityGeneric< std::vector< reco::Track >, std::vector< reco::Vertex >, int, unsigned int >::insert(), edm::ServiceRegistry::isAvailable(), edm::reftobase::RefProdKey::key(), edm::RefToBase< T >::key(), edm::makeRefTo(), edm::reftobase::InvalidHolderToVector< T, REF >::makeVectorBaseHolder(), edm::reftobase::InvalidRefHolderToRefVector< REF >::makeVectorBaseHolder(), edm::reftobase::RefProdHolderToVector< T >::makeVectorBaseHolder(), edm::reftobase::RefProdRefHolderToRefVector::makeVectorBaseHolder(), edm::reftobase::InvalidHolderToVector< T, REF >::makeVectorHolder(), edm::reftobase::InvalidRefHolderToRefVector< REF >::makeVectorHolder(), edm::reftobase::RefProdHolderToVector< T >::makeVectorHolder(), edm::reftobase::RefProdRefHolderToRefVector::makeVectorHolder(), edm::DoNotFillView< T >::operator()(), edm::DoNotSetPtr< T >::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::reftobase::RefVectorHolderBase::const_iterator::operator-=(), edm::RefToBaseProd< T >::operator->(), edm::reftobase::RefVectorHolderBase::const_iterator::operator<(), edm::AssociationMap< edm::OneToMany< reco::BasicJetCollection, reco::TrackCollection > >::operator[](), edm::reftobase::RefVectorHolder< REFV >::push_back(), edm::reftobase::IndirectVectorHolder< reco::Candidate >::push_back(), edm::reftobase::VectorHolder< reco::Candidate, reco::GsfElectronRefVector >::push_back(), edm::detail::reallyfillPtrVector(), edm::reftobase::RefVectorHolderNoFillView< REFV >::reallyFillView(), edm::detail::reallySetPtr(), edm::ESProducer::registerProduct(), edm::helper::Filler< Association< C > >::throwAdd(), edm::helper::Filler< Association< C > >::throwFillSize(), edm::ValueMap< edm::Ref< std::vector< reco::PFCandidate >, reco::PFCandidate, edm::refhelper::FindUsingAdvance< std::vector< reco::PFCandidate >, reco::PFCandidate > > >::throwIndexBound(), edm::Association< reco::FFTJPTJetCollection >::throwIndexMapBound(), edm::reftobase::BaseVectorHolder< T >::const_iterator::throwInvalidReference(), edm::ValueMap< edm::Ref< std::vector< reco::PFCandidate >, reco::PFCandidate, edm::refhelper::FindUsingAdvance< std::vector< reco::PFCandidate >, reco::PFCandidate > > >::throwNotExisting(), and edm::Association< reco::FFTJPTJetCollection >::throwRefSet().

115  {
116  Exception e(aCategory, std::string(message0));
117  e << message1 << message2 << message3 << message4;
118  throw e;
119  }
void Exception::throwThis ( Code  category,
char const *  message0,
int  intVal,
char const *  message2 = "" 
)
static

Definition at line 122 of file EDMException.cc.

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

122  {
123  Exception e(aCategory, std::string(message0));
124  e << intVal << message1;
125  throw e;
126  }

Member Data Documentation

Code edm::Exception::category_
private

Definition at line 119 of file EDMException.h.

Referenced by returnCode_().