ATLAS Offline Software
Loading...
Searching...
No Matches
Calorimeter/CaloUtils/src/exceptions.cxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
3 */
10
11
13#include <sstream>
14
15
16namespace CaloUtils {
17
18
20std::string excBadToolConstantVersion_format (const std::string& toolName,
21 const std::string& constName,
22 unsigned int toolVersion,
23 unsigned int constVersion)
24{
25 std::ostringstream os;
26 os << "ExcBadToolConstantVersion: version mismatch for tool " << toolName
27 << " constant " << constName
28 << " constant version " << constVersion
29 << " is larger than tool version " << toolVersion;
30 return os.str();
31}
32
33
42 (const std::string& toolName,
43 const std::string& constName,
44 unsigned int toolVersion,
45 unsigned int constVersion)
47 constName,
48 toolVersion,
49 constVersion))
50{
51}
52
53
54//*************************************************************************
55
56
58std::string excConstantNotSet_format (const std::string& toolName,
59 const std::string& constName)
60{
61 std::ostringstream os;
62 os << "ExcConstantNotSet: constant " << constName << " in tool " << toolName
63 << " was not set.";
64 return os.str();
65}
66
67
74 (const std::string& toolName,
75 const std::string& constName)
77 constName))
78{
79}
80
81
82//*************************************************************************
83
84
86std::string excConstantReset_format (const std::string& toolName,
87 const std::string& constName)
88{
89 std::ostringstream os;
90 os << "ExcConstantReset: constant " << constName << " in tool " << toolName
91 << " set more than once.";
92 return os.str();
93}
94
95
102 (const std::string& toolName,
103 const std::string& constName)
105 constName))
106{
107}
108
109
110//*************************************************************************
111
112
114std::string excBadContextlessRetrieve_format (const std::string& toolName,
115 const std::string& constName)
116{
117 std::ostringstream os;
118 os << "ExcBadContextlessRetrieve: constant " << constName << " in tool " << toolName
119 << " bad contextless retrieve.";
120 return os.str();
121}
122
123
130 (const std::string& toolName,
131 const std::string& constName)
133 constName))
134{
135}
136
137
138
144void throwExcBadContextlessRetrieve (const std::string& toolName,
145 const std::string& constName)
146{
147 throw ExcBadContextlessRetrieve (toolName, constName);
148}
149
150
151} // namespace CaloUtils
Exceptions that can be thrown from CaloUtils.
ExcBadContextlessRetrieve(const std::string &toolName, const std::string &constName)
Constructor.
ExcBadToolConstantVersion(const std::string &toolName, const std::string &constName, unsigned int toolVersion, unsigned int constVersion)
Constructor.
ExcConstantNotSet(const std::string &toolName, const std::string &constName)
Constructor.
ExcConstantReset(const std::string &toolName, const std::string &constName)
Constructor.
STL class.
void throwExcBadContextlessRetrieve(const std::string &toolName, const std::string &constName)
Throw a CaloUtils::ExcBadContextlessRetrieve exception.
std::string excBadToolConstantVersion_format(const std::string &toolName, const std::string &constName, unsigned int toolVersion, unsigned int constVersion)
Helper: Format exception string.
std::string excBadContextlessRetrieve_format(const std::string &toolName, const std::string &constName)
Helper: Format exception string.
std::string excConstantReset_format(const std::string &toolName, const std::string &constName)
Helper: Format exception string.
std::string excConstantNotSet_format(const std::string &toolName, const std::string &constName)
Helper: Format exception string.
STL namespace.