CMS 3D CMS Logo

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,
61 
65 
67 
69 
71 
72  CaughtSignal = 9000
73  };
74 
75  } // namespace errors
76 
78  public:
80 
81  explicit Exception(Code category);
82 
83  Exception(Code category, std::string const& message);
84  Exception(Code category, char const* message);
85 
86  Exception(Code category, std::string const& message, cms::Exception const& another);
87  Exception(Code category, char const* message, cms::Exception const& another);
88 
89  Exception(Exception const& other);
90 
91  ~Exception() noexcept override;
92 
93  void swap(Exception& other) { std::swap(category_, other.category_); }
94 
95  Exception& operator=(Exception const& other);
96 
97  Code categoryCode() const { return category_; }
98 
99  static const std::string& codeToString(Code);
100 
101  static void throwThis(Code category,
102  char const* message0 = "",
103  char const* message1 = "",
104  char const* message2 = "",
105  char const* message3 = "",
106  char const* message4 = "");
107  static void throwThis(Code category, char const* message0, int intVal, char const* message2 = "");
108 
109  Exception* clone() const override;
110 
111  private:
112  void rethrow() override;
113  int returnCode_() const override;
114 
116  };
117 } // namespace edm
118 
119 #endif
dso_export
#define dso_export
Definition: Visibility.h:11
taus_updatedMVAIds_cff.category
category
Definition: taus_updatedMVAIds_cff.py:30
edm::errors::MismatchedInputFiles
Definition: EDMException.h:52
edm::Exception::category_
Code category_
Definition: EDMException.h:115
edm::errors::InvalidReference
Definition: EDMException.h:39
edm::errors::ConfigFileNotFound
Definition: EDMException.h:24
edm::errors::EventTimeout
Definition: EDMException.h:42
edm::errors::LogicError
Definition: EDMException.h:37
edm::errors::ProductDoesNotSupportPtr
Definition: EDMException.h:55
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::swap
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
edm::errors::EventCorruption
Definition: EDMException.h:43
edm::errors::FileWriteError
Definition: EDMException.h:66
edm::errors::CaughtSignal
Definition: EDMException.h:72
edm::errors::EventGenerationFailure
Definition: EDMException.h:70
edm::errors::Unknown
Definition: EDMException.h:29
edm::errors::ErrorCodes
ErrorCodes
Definition: EDMException.h:22
edm::errors::BadExceptionType
Definition: EDMException.h:31
edm::errors::NoSecondaryFiles
Definition: EDMException.h:60
edm::errors::FileInPathError
Definition: EDMException.h:48
edm::errors::NotFound
Definition: EDMException.h:57
edm::errors::FileOpenError
Definition: EDMException.h:49
edm::Exception
Definition: EDMException.h:77
edm::errors::ProductNotFound
Definition: EDMException.h:33
edm::errors::NullPointerError
Definition: EDMException.h:40
edm::errors::ProductDoesNotSupportViews
Definition: EDMException.h:54
errors
Definition: errors.py:1
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
edm::errors::FatalRootError
Definition: EDMException.h:51
edm::errors::DictionaryNotFound
Definition: EDMException.h:34
edm::errors::InsertFailure
Definition: EDMException.h:35
trackingPlots.other
other
Definition: trackingPlots.py:1465
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::errors::ExceededResourceRSS
Definition: EDMException.h:63
edm::errors::EventProcessorFailure
Definition: EDMException.h:46
edm::errors::FileNameInconsistentWithGUID
Definition: EDMException.h:68
edm::errors::ExceededResourceTime
Definition: EDMException.h:64
edm::errors::ScheduleExecutionFailure
Definition: EDMException.h:45
edm::Exception::categoryCode
Code categoryCode() const
Definition: EDMException.h:97
edm::Exception::Code
errors::ErrorCodes Code
Definition: EDMException.h:79
edm::errors::StdException
Definition: EDMException.h:28
edm::errors::FallbackFileOpenError
Definition: EDMException.h:59
edm::errors::ExceededResourceVSize
Definition: EDMException.h:62
edm::errors::ConfigFileReadError
Definition: EDMException.h:25
edm::errors::NoProductSpecified
Definition: EDMException.h:41
edm::errors::CommandLineProcessing
Definition: EDMException.h:23
Exception
Definition: hltDiff.cc:246
edm::errors::OtherCMS
Definition: EDMException.h:27
edm::errors::BadAlloc
Definition: EDMException.h:30
Exception.h
edm::errors::FormatIncompatibility
Definition: EDMException.h:58
cms::Exception
Definition: Exception.h:70
edm::errors::FileReadError
Definition: EDMException.h:50
edm::errors::Configuration
Definition: EDMException.h:36
edm::errors::UnimplementedFeature
Definition: EDMException.h:38