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 Types inherited from cms::Exception
typedef std::string Category
 
typedef std::list< CategoryCategoryList
 

Public Member Functions

Code categoryCode () const
 
 Exception (Code category)
 
 Exception (Code category, std::string const &message)
 
 Exception (Code category, std::string const &message, cms::Exception const &another)
 
 Exception (Exception const &other)
 
int returnCode () const
 
virtual ~Exception () throw ()
 
- Public Member Functions inherited from cms::Exception
void append (Exception const &another)
 
void append (std::string const &more_information)
 
void append (char const *more_information)
 
std::string category () const
 
 Exception (Category const &category)
 
 Exception (Category const &category, std::string const &message)
 
 Exception (Category const &category, std::string const &message, Exception const &another)
 
 Exception (Exception const &other)
 
virtual std::string explainSelf () const
 
CategoryList const & history () const
 
void raise ()
 
std::string rootCause () const
 
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 ()
 

Private Attributes

Code category_
 

Detailed Description

Definition at line 72 of file EDMException.h.

Member Typedef Documentation

Definition at line 74 of file EDMException.h.

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

Definition at line 92 of file EDMException.h.

Constructor & Destructor Documentation

Exception::Exception ( Code  category)
explicit

Definition at line 57 of file EDMException.cc.

57  :
58  cms::Exception(codeToString(aCategory)),
59  category_(aCategory) {
60  }
static std::string codeToString(Code)
-----------— implementation details ---------------—
Definition: EDMException.cc:48
Exception::Exception ( Code  category,
std::string const &  message 
)

Definition at line 62 of file EDMException.cc.

62  :
64  category_(aCategory) {
65  }
static std::string codeToString(Code)
-----------— implementation details ---------------—
Definition: EDMException.cc:48
string message
Definition: argparse.py:126
Exception::Exception ( Code  category,
std::string const &  message,
cms::Exception const &  another 
)

Definition at line 67 of file EDMException.cc.

67  :
68  cms::Exception(codeToString(aCategory),message,another),
69  category_(aCategory) {
70  }
static std::string codeToString(Code)
-----------— implementation details ---------------—
Definition: EDMException.cc:48
string message
Definition: argparse.py:126
Exception::Exception ( Exception const &  other)

Definition at line 72 of file EDMException.cc.

72  :
73  cms::Exception(other),
74  category_(other.category_) {
75  }
Exception::~Exception ( )
throw (
)
virtual

Reimplemented from cms::Exception.

Definition at line 77 of file EDMException.cc.

77  {
78  }

Member Function Documentation

Code edm::Exception::categoryCode ( ) const
inline
std::string Exception::codeToString ( Code  c)
static

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

Definition at line 48 of file EDMException.cc.

References edm::getCodeTable(), and i.

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

48  {
49  extern void getCodeTable(CodeMap*&);
50  CodeMap* trans;
51  getCodeTable(trans);
52  CodeMap::const_iterator i(trans->find(c));
53  return i!=trans->end() ? i->second : std::string("UnknownCode");
54  }
int i
Definition: DBlmapReader.cc:9
std::map< Code, std::string > CodeMap
Definition: EDMException.h:92
void getCodeTable(edm::Exception::CodeMap *&setme)
Definition: EDMException.cc:40
void Exception::rethrow ( void  )
privatevirtual

Reimplemented from cms::Exception.

Definition at line 100 of file EDMException.cc.

100  {
101  throw *this;
102  }
int edm::Exception::returnCode ( ) const
inline

Definition at line 88 of file EDMException.h.

References category_.

88 { return static_cast<int>(category_); }
void Exception::throwThis ( Code  category,
char const *  message0 = "",
char const *  message1 = "",
char const *  message2 = "",
char const *  message3 = "",
char const *  message4 = "" 
)
static

Definition at line 81 of file EDMException.cc.

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< BasicClusterCollection, float, unsigned short >::insert(), edm::OneToMany< JetC, reco::TrackCollection >::insert(), edm::OneToOneGeneric< CKey, CVal, index >::insert(), edm::OneToManyWithQualityGeneric< TrackingParticleCollection, edm::View< reco::Track >, double >::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::LogDebug_::operator<<(), edm::LogTrace_::operator<<(), edm::AssociationMap< edm::OneToManyWithQualityGeneric< TrackingParticleCollection, edm::View< reco::Track >, double > >::operator[](), edm::reftobase::RefVectorHolder< REFV >::push_back(), edm::reftobase::IndirectVectorHolder< T >::push_back(), edm::reftobase::VectorHolder< T, REFVECTOR >::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< reco::MuonMETCorrectionData >::throwIndexBound(), edm::Association< C >::throwIndexMapBound(), edm::reftobase::BaseVectorHolder< T >::const_iterator::throwInvalidReference(), edm::ValueMap< reco::MuonMETCorrectionData >::throwNotExisting(), and edm::Association< C >::throwRefSet().

86  {
87  Exception e(aCategory, std::string(message0));
88  e << message1 << message2 << message3 << message4;
89  throw e;
90  }
void Exception::throwThis ( Code  category,
char const *  message0,
int  intVal,
char const *  message2 = "" 
)
static

Definition at line 93 of file EDMException.cc.

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

Member Data Documentation

Code edm::Exception::category_
private

Definition at line 105 of file EDMException.h.

Referenced by categoryCode(), and returnCode().