ATLAS Offline Software
Control/StoreGate/StoreGate/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 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
14 #ifndef STOREGATE_EXCEPTIONS_H
15 #define STOREGATE_EXCEPTIONS_H
16 
17 
19 #include "CxxUtils/sgkey_t.h"
20 #include "GaudiKernel/ClassID.h"
21 #include "GaudiKernel/EventContext.h"
22 #include "GaudiKernel/DataHandle.h"
23 #include <stdexcept>
24 #include <typeinfo>
25 #include <string>
26 
27 
28 namespace SG {
29 
30 
37  : public std::runtime_error
38 {
39 public:
44 };
45 
46 
50 [[noreturn]]
52 
53 
61  : public std::runtime_error
62 {
63 public:
68  ExcBadHandleKey (const std::string& key);
69 };
70 
71 
76  : public std::runtime_error
77 {
78 public:
83  ExcForbiddenMethod (const std::string& name);
84 };
85 
86 
91  : public std::runtime_error
92 {
93 public:
100  ExcHandleInitError (CLID clid,
101  const std::string& sgkey,
102  const std::string& storename);
103 };
104 
105 
110  : public std::runtime_error
111 {
112 public:
121  ExcUninitKey (CLID clid,
122  const std::string& sgkey,
123  const std::string& storename,
124  const std::string& holdername = "",
125  const std::string& htype = "VarHandle");
126 };
127 
128 
133  : public std::runtime_error
134 {
135 public:
142  ExcConstObject (CLID clid,
143  const std::string& sgkey,
144  const std::string& storename);
145 };
146 
147 
152  : public std::runtime_error
153 {
154 public:
161  ExcNullWriteHandle (CLID clid,
162  const std::string& sgkey,
163  const std::string& storename);
164 };
165 
166 
173 [[noreturn]]
174 void throwExcNullWriteHandle (CLID clid,
175  const std::string& sgkey,
176  const std::string& storename);
177 
178 
183  : public std::runtime_error
184 {
185 public:
192  ExcNullReadHandle (CLID clid,
193  const std::string& sgkey,
194  const std::string& storename);
195 };
196 
197 
204 [[noreturn]]
205 void throwExcNullReadHandle (CLID clid,
206  const std::string& sgkey,
207  const std::string& storename);
208 
209 
214  : public std::runtime_error
215 {
216 public:
224  const std::string& sgkey,
225  const std::string& storename);
226 };
227 
228 
235 [[noreturn]]
236 void throwExcNullUpdateHandle (CLID clid,
237  const std::string& sgkey,
238  const std::string& storename);
239 
240 
250  : public std::runtime_error
251 {
252 public:
260  const std::string& sgkey,
261  const std::string& storename);
262 };
263 
264 
271 [[noreturn]]
273  const std::string& sgkey,
274  const std::string& storename);
275 
276 
281  : public std::runtime_error
282 {
283 public:
288 };
289 
290 
295  : public std::runtime_error
296 {
297 public:
302 };
303 
304 
311  : public std::runtime_error
312 {
313 public:
319  ExcBadContext (const EventContext& ctx, const std::string& key);
320 };
321 
322 
329  : public std::runtime_error
330 {
331 public:
337  ExcNoCondCont (const std::string& key, const std::string& why);
338 };
339 
340 
345  : public std::runtime_error
346 {
347 public:
352 };
353 
354 
359  : public std::runtime_error
360 {
361 public:
365  ExcNoRange();
366 };
367 
368 
369 
370 
375  : public std::runtime_error
376 {
377 public:
385  CLID clid,
386  const std::string& decorKey);
387 };
388 
389 
393 [[noreturn]]
395  CLID clid,
396  const std::string& decorKey);
397 
398 
399 } // namespace SG
400 
401 
402 #endif // not STOREGATE_EXCEPTIONS_H
common.sgkey
def sgkey(tool)
Definition: common.py:1028
SG::ExcBadContext
Exception — Bad EventContext extension while building ReadCondHandle.
Definition: Control/StoreGate/StoreGate/exceptions.h:312
SG::ExcNullHandleKey
Exception — Attempt to dereference a Read/Write/UpdateHandle with a null key.
Definition: Control/StoreGate/StoreGate/exceptions.h:38
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::ExcNullUpdateHandle::ExcNullUpdateHandle
ExcNullUpdateHandle(CLID clid, const std::string &sgkey, const std::string &storename)
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:278
SG::ExcBadDecorElement
Exception — DecorHandle given an element not in the requested container.
Definition: Control/StoreGate/StoreGate/exceptions.h:376
SG::throwExcNullWriteHandle
void throwExcNullWriteHandle(CLID clid, const std::string &sgkey, const std::string &storename)
Throw a SG::ExcNullWriteHandle exception.
Definition: Control/StoreGate/src/exceptions.cxx:202
SG::ExcConstObject::ExcConstObject
ExcConstObject(CLID clid, const std::string &sgkey, const std::string &storename)
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:157
SG::ExcHandleInitError::ExcHandleInitError
ExcHandleInitError(CLID clid, const std::string &sgkey, const std::string &storename)
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:87
SG::ExcBadHandleKey::ExcBadHandleKey
ExcBadHandleKey(const std::string &key)
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:45
SG::ExcBadReadCondHandleInit
Exception — ReadCondHandle didn't initialize in getRange().
Definition: Control/StoreGate/StoreGate/exceptions.h:346
SG::ExcNoRange
Exception — Range not set in ReadCondHandle::getRange().
Definition: Control/StoreGate/StoreGate/exceptions.h:360
SG::ExcBadInitializedReadHandleKey::ExcBadInitializedReadHandleKey
ExcBadInitializedReadHandleKey()
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:363
SG::ExcNoCondCont
Exception — Can't retrieve CondCont from ReadCondHandle.
Definition: Control/StoreGate/StoreGate/exceptions.h:330
SG::ExcNullReadHandle
Exception — Deference of read handle failed.
Definition: Control/StoreGate/StoreGate/exceptions.h:184
SG::ExcNullWriteHandle::ExcNullWriteHandle
ExcNullWriteHandle(CLID clid, const std::string &sgkey, const std::string &storename)
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:188
SG::ExcBadContext::ExcBadContext
ExcBadContext(const EventContext &ctx, const std::string &key)
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:391
SG::ExcNonConstHandleKey::ExcNonConstHandleKey
ExcNonConstHandleKey(CLID clid, const std::string &sgkey, const std::string &storename)
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:323
SG::ExcBadInitializedReadHandleKey
Exception — Initialization of InitializedReadHandleKey failed.
Definition: Control/StoreGate/StoreGate/exceptions.h:296
SG::ExcNonConstHandleKey
Exception — Attempt to get non-const VarHandleKey from non-owning VarHandle.
Definition: Control/StoreGate/StoreGate/exceptions.h:251
SG::throwExcNullUpdateHandle
void throwExcNullUpdateHandle(CLID clid, const std::string &sgkey, const std::string &storename)
Throw a SG::ExcNullUpdateHandle exception.
Definition: Control/StoreGate/src/exceptions.cxx:292
SG::throwExcNullHandleKey
void throwExcNullHandleKey()
Throw a SG::ExcNullHandleKey exception.
Definition: Control/StoreGate/src/exceptions.cxx:32
SG::ExcBadHandleKey
Exception — Bad key format for VarHandleKey.
Definition: Control/StoreGate/StoreGate/exceptions.h:62
SG::ExcForbiddenMethod::ExcForbiddenMethod
ExcForbiddenMethod(const std::string &name)
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:58
Preparation.mode
mode
Definition: Preparation.py:96
SG::ExcConstObject
Exception — Tried to retrieve non-const pointer to const object.
Definition: Control/StoreGate/StoreGate/exceptions.h:134
SG::ExcForbiddenMethod
Exception — Forbidden method called.
Definition: Control/StoreGate/StoreGate/exceptions.h:77
SG::ExcNoCondCont::ExcNoCondCont
ExcNoCondCont(const std::string &key, const std::string &why)
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:417
SG::ExcNullHandleKey::ExcNullHandleKey
ExcNullHandleKey()
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:22
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
SG::ExcInvalidIterator
Exception — Deference invalid SG::Iterator.
Definition: Control/StoreGate/StoreGate/exceptions.h:282
SG::ExcBadDecorElement::ExcBadDecorElement
ExcBadDecorElement(Gaudi::DataHandle::Mode mode, CLID clid, const std::string &decorKey)
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:476
SG::throwExcNullReadHandle
void throwExcNullReadHandle(CLID clid, const std::string &sgkey, const std::string &storename)
Throw a SG::ExcNullReadHandle exception.
Definition: Control/StoreGate/src/exceptions.cxx:247
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
EventContainers::Mode
Mode
Definition: IdentifiableContainerBase.h:13
SG::ExcNullReadHandle::ExcNullReadHandle
ExcNullReadHandle(CLID clid, const std::string &sgkey, const std::string &storename)
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:233
SG::throwExcNonConstHandleKey
void throwExcNonConstHandleKey(CLID clid, const std::string &sgkey, const std::string &storename)
Throw a SG::ExcNonConstHandleKey exception.
Definition: Control/StoreGate/src/exceptions.cxx:337
AuxTypes.h
Basic definitions for auxiliary types.
SG::ExcNoRange::ExcNoRange
ExcNoRange()
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:441
sgkey_t.h
Define the type used for hashed StoreGate key+CLID pairs.
SG::ExcUninitKey
Exception — Tried to create a handle from an uninitialized key.
Definition: Control/StoreGate/StoreGate/exceptions.h:111
SG::ExcBadReadCondHandleInit::ExcBadReadCondHandleInit
ExcBadReadCondHandleInit()
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:429
SG::ExcInvalidIterator::ExcInvalidIterator
ExcInvalidIterator()
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:351
SG::throwExcBadDecorElement
void throwExcBadDecorElement(Gaudi::DataHandle::Mode mode, CLID clid, const std::string &decorKey)
Throw a SG::ExcBadDecorElement exception.
Definition: Control/StoreGate/src/exceptions.cxx:488
SG::ExcHandleInitError
Exception — Error initializing VarHandle from VarHandleKey.
Definition: Control/StoreGate/StoreGate/exceptions.h:92
SG::ExcUninitKey::ExcUninitKey
ExcUninitKey(CLID clid, const std::string &sgkey, const std::string &storename, const std::string &holdername="", const std::string &htype="VarHandle")
Constructor.
Definition: Control/StoreGate/src/exceptions.cxx:124
SG::ExcNullWriteHandle
Exception — Attempt to dereference write handle before record.
Definition: Control/StoreGate/StoreGate/exceptions.h:153
SG::ExcNullUpdateHandle
Exception — Deference of update handle failed.
Definition: Control/StoreGate/StoreGate/exceptions.h:215
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37