ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthAllocators
src
Control/AthAllocators/src/exceptions.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
10
11
#include "
AthAllocators/exceptions.h
"
12
#include <format>
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
char
* errstr =
nullptr
;
37
char
errbuf[256];
38
#ifdef _GNU_SOURCE
39
errstr = strerror_r (errnum, errbuf,
sizeof
(errbuf));
40
#else
41
strerror_r (errnum, errbuf,
sizeof
(errbuf));
42
errstr = errbuf;
43
#endif
44
return
std::format (
"SG::ExcProtection: Attempt to change memory protection failed: {}"
, errstr);
45
}
46
47
52
ExcProtection::ExcProtection
(
int
errnum)
53
:
std
::runtime_error (
excProtection_format
(errnum))
54
{
55
}
56
57
58
//*************************************************************************
59
60
64
ExcProtected::ExcProtected
()
65
:
std
::runtime_error (
"SG::ExcProtected: Attempt to change protected arena."
)
66
{
67
}
68
69
70
}
// namespace SG
exceptions.h
Exceptions that can be thrown from AthAllocators.
SG::ExcDifferentArenas::ExcDifferentArenas
ExcDifferentArenas()
Constructor.
Definition
Control/AthAllocators/src/exceptions.cxx:25
SG::ExcProtected::ExcProtected
ExcProtected()
Constructor.
Definition
Control/AthAllocators/src/exceptions.cxx:64
SG::ExcProtection::ExcProtection
ExcProtection(int errnum)
Constructor.
Definition
Control/AthAllocators/src/exceptions.cxx:52
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::excProtection_format
std::string excProtection_format(int errnum)
Definition
Control/AthAllocators/src/exceptions.cxx:34
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0