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, and the configuration
20  // fragment FWCore/Framework/python/test/cmsExceptionsFatalOption_cff.py.
21 
22  enum ErrorCodes {
26 
27  OtherCMS = 8001,
28  StdException = 8002,
29  Unknown = 8003,
30  BadAlloc = 8004,
32 
35  InsertFailure = 8008,
36  Configuration = 8009,
37  LogicError = 8010,
42  EventTimeout = 8015,
44 
47 
49  FileOpenError = 8020,
50  FileReadError = 8021,
53 
56 
57  NotFound = 8026,
60 
64 
66 
67  CaughtSignal = 9000
68  };
69 
70  }
71 
73  public:
75 
76  explicit Exception(Code category);
77 
79  Exception(Code category, char const* message);
80 
81  Exception(Code category, std::string const& message, cms::Exception const& another);
82  Exception(Code category, char const* message, cms::Exception const& another);
83 
84  Exception(Exception const& other);
85 
86  virtual ~Exception() throw();
87 
88  void swap(Exception& other) {
89  std::swap(category_, other.category_);
90  }
91 
92  Exception& operator=(Exception const& other);
93 
94  Code categoryCode() const { return category_; }
95 
96  static const std::string& codeToString(Code);
97 
98  static void throwThis(Code category,
99  char const* message0 = "",
100  char const* message1 = "",
101  char const* message2 = "",
102  char const* message3 = "",
103  char const* message4 = "");
104  static void throwThis(Code category, char const* message0, int intVal, char const* message2 = "");
105 
106  virtual Exception* clone() const;
107 
108  private:
109 
110  virtual void rethrow();
111  virtual int returnCode_() const;
112 
114  };
115 }
116 
117 #endif
Code categoryCode() const
Definition: EDMException.h:94
errors::ErrorCodes Code
Definition: EDMException.h:74
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