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 Attributes
edm::CodedException< Code > Class Template Reference

#include <CodedException.h>

Inheritance diagram for edm::CodedException< Code >:
cms::Exception

Public Types

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
 
 CodedException (Code category)
 
 CodedException (Code category, const std::string &message)
 
 CodedException (Code category, const std::string &message, const cms::Exception &another)
 
 CodedException (const CodedException &other)
 
int returnCode () const
 
virtual ~CodedException () 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 ()
 
virtual ~Exception () throw ()
 

Static Public Member Functions

static std::string codeToString (Code)
 -----------— implementation details ---------------— More...
 

Private Attributes

Code category_
 

Detailed Description

template<class Code>
class edm::CodedException< Code >

Definition at line 23 of file CodedException.h.

Member Typedef Documentation

template<class Code >
typedef std::map<Code,std::string> edm::CodedException< Code >::CodeMap

Definition at line 45 of file CodedException.h.

Constructor & Destructor Documentation

template<class Code >
edm::CodedException< Code >::CodedException ( Code  category)
explicit

Definition at line 71 of file CodedException.h.

71  :
72  cms::Exception(codeToString(aCategory)),
73  category_(aCategory)
74  {
75  }
static std::string codeToString(Code)
-----------— implementation details ---------------—
template<class Code >
edm::CodedException< Code >::CodedException ( Code  category,
const std::string &  message 
)

Definition at line 78 of file CodedException.h.

79  :
81  category_(aCategory)
82  {
83  }
static std::string codeToString(Code)
-----------— implementation details ---------------—
string message
Definition: argparse.py:126
template<class Code >
edm::CodedException< Code >::CodedException ( Code  category,
const std::string &  message,
const cms::Exception another 
)

Definition at line 86 of file CodedException.h.

88  :
89  cms::Exception(codeToString(aCategory),message,another),
90  category_(aCategory)
91  {
92  }
static std::string codeToString(Code)
-----------— implementation details ---------------—
string message
Definition: argparse.py:126
template<class Code >
edm::CodedException< Code >::CodedException ( const CodedException< Code > &  other)

Definition at line 95 of file CodedException.h.

95  :
96  cms::Exception(other),
97  category_(other.category_)
98  {
99  }
template<class Code >
edm::CodedException< Code >::~CodedException ( )
throw (
)
virtual

Definition at line 102 of file CodedException.h.

103  {
104  }

Member Function Documentation

template<class Code >
Code edm::CodedException< Code >::categoryCode ( ) const
inline

Definition at line 39 of file CodedException.h.

References edm::CodedException< Code >::category_.

39 { return category_; }
template<class Code >
std::string edm::CodedException< Code >::codeToString ( Code  c)
static

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

Definition at line 60 of file CodedException.h.

References edm::getCodeTable(), and i.

61  {
62  extern void getCodeTable(CodeMap*&);
63  CodeMap* trans;
64  getCodeTable(trans);
65  typename CodeMap::const_iterator i(trans->find(c));
66  return i!=trans->end() ? i->second : std::string("UnknownCode");
67  }
int i
Definition: DBlmapReader.cc:9
std::map< Code, std::string > CodeMap
void getCodeTable(edm::Exception::CodeMap *&setme)
Definition: EDMException.cc:40
template<class Code >
int edm::CodedException< Code >::returnCode ( ) const
inline

Definition at line 41 of file CodedException.h.

References edm::CodedException< Code >::category_.

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

Member Data Documentation

template<class Code >
Code edm::CodedException< Code >::category_
private