ATLAS Offline Software
Calorimeter/CaloUtils/CaloUtils/exceptions.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
4  */
13 #ifndef CALOUTILS_EXCEPTIONS_H
14 #define CALOUTILS_EXCEPTIONS_H
15 
16 
17 #include <stdexcept>
18 #include <string>
19 
20 
21 namespace CaloUtils {
22 
23 
31  : public std::runtime_error
32 {
33 public:
41  ExcBadToolConstantVersion (const std::string& toolName,
42  const std::string& constName,
43  unsigned int toolVersion,
44  unsigned int constVersion);
45 };
46 
47 
54  : public std::runtime_error
55 {
56 public:
62  ExcConstantNotSet (const std::string& toolName,
63  const std::string& constName);
64 };
65 
66 
73  : public std::runtime_error
74 {
75 public:
81  ExcConstantReset (const std::string& toolName,
82  const std::string& constName);
83 };
84 
85 
93  : public std::runtime_error
94 {
95 public:
101  ExcBadContextlessRetrieve (const std::string& toolName,
102  const std::string& constName);
103 };
104 
105 
106 
112 [[noreturn]]
113 void throwExcBadContextlessRetrieve (const std::string& toolName,
114  const std::string& constName);
115 
116 
117 } // namespace CaloUtils
118 
119 
120 #endif // not CALOUTILS_EXCEPTIONS_H
CaloUtils
Definition: ToolWithConstantsTestTool.h:21
CaloUtils::ExcBadContextlessRetrieve::ExcBadContextlessRetrieve
ExcBadContextlessRetrieve(const std::string &toolName, const std::string &constName)
Constructor.
Definition: Calorimeter/CaloUtils/src/exceptions.cxx:130
CaloUtils::ExcConstantReset
Exception — constant set more than once.
Definition: Calorimeter/CaloUtils/CaloUtils/exceptions.h:74
CaloUtils::ExcBadToolConstantVersion
Exception — version mismatch for tool.
Definition: Calorimeter/CaloUtils/CaloUtils/exceptions.h:32
CaloUtils::ExcBadContextlessRetrieve
Exception — Bad contextless retrieve.
Definition: Calorimeter/CaloUtils/CaloUtils/exceptions.h:94
CaloUtils::ExcBadToolConstantVersion::ExcBadToolConstantVersion
ExcBadToolConstantVersion(const std::string &toolName, const std::string &constName, unsigned int toolVersion, unsigned int constVersion)
Constructor.
Definition: Calorimeter/CaloUtils/src/exceptions.cxx:42
CaloUtils::ExcConstantReset::ExcConstantReset
ExcConstantReset(const std::string &toolName, const std::string &constName)
Constructor.
Definition: Calorimeter/CaloUtils/src/exceptions.cxx:102
CaloUtils::throwExcBadContextlessRetrieve
void throwExcBadContextlessRetrieve(const std::string &toolName, const std::string &constName)
Throw a CaloUtils::ExcBadContextlessRetrieve exception.
Definition: Calorimeter/CaloUtils/src/exceptions.cxx:144
CaloUtils::ExcConstantNotSet::ExcConstantNotSet
ExcConstantNotSet(const std::string &toolName, const std::string &constName)
Constructor.
Definition: Calorimeter/CaloUtils/src/exceptions.cxx:74
CaloUtils::ExcConstantNotSet
Exception — constant not set.
Definition: Calorimeter/CaloUtils/CaloUtils/exceptions.h:55