CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EDMException.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_EDMException_h
2 #define FWCore_Utilities_EDMException_h
3 
12 #include <map>
13 #include <string>
14 
15 namespace edm {
16  namespace errors {
17 
18  // If you add a new entry to the set of values, make sure to
19  // update the translation map in EDMException.cc, the actions
20  // table in FWCore/Framework/src/Actions.cc, and the configuration
21  // fragment FWCore/Framework/python/test/cmsExceptionsFatalOption_cff.py.
22 
23  enum ErrorCodes {
27 
28  OtherCMS = 8001,
29  StdException = 8002,
30  Unknown = 8003,
31  BadAlloc = 8004,
33 
36  InsertFailure = 8008,
37  Configuration = 8009,
38  LogicError = 8010,
43  EventTimeout = 8015,
45 
48 
50  FileOpenError = 8020,
51  FileReadError = 8021,
54 
57 
58  NotFound = 8026,
61 
65 
66  CaughtSignal = 9000
67  };
68 
69  }
70 
72  public:
74 
75  explicit Exception(Code category);
76 
78  Exception(Code category, char const* message);
79 
80  Exception(Code category, std::string const& message, cms::Exception const& another);
81  Exception(Code category, char const* message, cms::Exception const& another);
82 
83  Exception(Exception const& other);
84 
85  virtual ~Exception() throw();
86 
87  void swap(Exception& other) {
88  std::swap(category_, other.category_);
89  }
90 
91  Exception& operator=(Exception const& other);
92 
93  Code categoryCode() const { return category_; }
94 
95  static const std::string& codeToString(Code);
96 
97  static void throwThis(Code category,
98  char const* message0 = "",
99  char const* message1 = "",
100  char const* message2 = "",
101  char const* message3 = "",
102  char const* message4 = "");
103  static void throwThis(Code category, char const* message0, int intVal, char const* message2 = "");
104 
105  virtual Exception* clone() const;
106 
107  private:
108 
109  virtual void rethrow();
110  virtual int returnCode_() const;
111 
113  };
114 }
115 
116 #endif
Code categoryCode() const
Definition: EDMException.h:93
errors::ErrorCodes Code
Definition: EDMException.h:73
std::vector< std::vector< int > > Code
#define dso_export
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:116
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135