ATLAS Offline Software
Control
AthAllocators
src
Control/AthAllocators/src/exceptions.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
11
#include "
AthAllocators/exceptions.h
"
12
#include <sstream>
13
#include <string.h>
14
15
16
namespace
SG
{
17
18
19
//*************************************************************************
20
21
25
ExcDifferentArenas::ExcDifferentArenas
()
26
: std::runtime_error (
"SG::ExcDifferentAreas: Attempt to assign between ArenaSharedHeapSTLAllocators for different arenas."
)
27
{
28
}
29
30
31
//*************************************************************************
32
33
34
std::string
excProtection_format
(
int
errnum)
35
{
36
std::ostringstream
os
;
37
os
<<
"SG::ExcProtection: Attempt to change memory protection failed: "
;
38
char
errbuf[256];
39
#ifdef _GNU_SOURCE
40
os
<< strerror_r (errnum, errbuf,
sizeof
(errbuf));
41
#else
42
strerror_r (errnum, errbuf,
sizeof
(errbuf));
43
os
<< errbuf;
44
#endif
45
return
os
.str();
46
}
47
48
53
ExcProtection::ExcProtection
(
int
errnum)
54
: std::runtime_error (
excProtection_format
(errnum))
55
{
56
}
57
58
59
//*************************************************************************
60
61
65
ExcProtected::ExcProtected
()
66
: std::runtime_error (
"SG::ExcProtected: Attempt to change protected arena."
)
67
{
68
}
69
70
71
}
// namespace SG
SG
Forward declaration.
Definition:
CaloCellPacker_400_500.h:32
SG::ExcProtection::ExcProtection
ExcProtection(int errnum)
Constructor.
Definition:
Control/AthAllocators/src/exceptions.cxx:53
SG::ExcDifferentArenas::ExcDifferentArenas
ExcDifferentArenas()
Constructor.
Definition:
Control/AthAllocators/src/exceptions.cxx:25
SG::excProtection_format
std::string excProtection_format(int errnum)
Definition:
Control/AthAllocators/src/exceptions.cxx:34
ReadFromCoolCompare.os
os
Definition:
ReadFromCoolCompare.py:231
SG::ExcProtected::ExcProtected
ExcProtected()
Constructor.
Definition:
Control/AthAllocators/src/exceptions.cxx:65
exceptions.h
Exceptions that can be thrown from AthAllocators.
Generated on Fri Jan 10 2025 21:10:14 for ATLAS Offline Software by
1.8.18