CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EDMException.cc
Go to the documentation of this file.
1 
3 
4 namespace edm {
5  namespace errors {
6  struct FilledMap {
7  FilledMap();
9  };
10  FilledMap::FilledMap() : trans_() {
37  }
38  }
39 
41  static errors::FilledMap fm;
42  setme = &fm.trans_;
43  }
44 
45 
47 
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  }
55 
56 
58  cms::Exception(codeToString(aCategory)),
59  category_(aCategory) {
60  }
61 
62  Exception::Exception(errors::ErrorCodes aCategory, std::string const& message):
63  cms::Exception(codeToString(aCategory),message),
64  category_(aCategory) {
65  }
66 
67  Exception::Exception(errors::ErrorCodes aCategory, std::string const& message, cms::Exception const& another):
68  cms::Exception(codeToString(aCategory),message,another),
69  category_(aCategory) {
70  }
71 
73  cms::Exception(other),
74  category_(other.category_) {
75  }
76 
78  }
79 
80  void
82  char const* message0,
83  char const* message1,
84  char const* message2,
85  char const* message3,
86  char const* message4) {
87  Exception e(aCategory, std::string(message0));
88  e << message1 << message2 << message3 << message4;
89  throw e;
90  }
91 
92  void
93  Exception::throwThis(errors::ErrorCodes aCategory, char const* message0, int intVal, char const* message1) {
94  Exception e(aCategory, std::string(message0));
95  e << intVal << message1;
96  throw e;
97  }
98 
99  void
101  throw *this;
102  }
103 
104 }
int i
Definition: DBlmapReader.cc:9
edm::Exception::CodeMap trans_
Definition: EDMException.cc:8
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:81
static std::string codeToString(Code)
-----------— implementation details ---------------—
Definition: EDMException.cc:48
Exception(Code category)
Definition: EDMException.cc:57
string message
Definition: argparse.py:126
std::map< Code, std::string > CodeMap
Definition: EDMException.h:94
#define EDM_MAP_ENTRY_NONS(map, name)
void getCodeTable(edm::Exception::CodeMap *&setme)
Definition: EDMException.cc:40
virtual void rethrow()
virtual ~Exception()
Definition: EDMException.cc:77