ATLAS Offline Software
Loading...
Searching...
No Matches
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*/
10
12#include <sstream>
13#include <string.h>
14
15
16namespace SG {
17
18
19//*************************************************************************
20
21
26 : std::runtime_error ("SG::ExcDifferentAreas: Attempt to assign between ArenaSharedHeapSTLAllocators for different arenas.")
27{
28}
29
30
31//*************************************************************************
32
33
34std::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
57
58
59//*************************************************************************
60
61
66 : std::runtime_error ("SG::ExcProtected: Attempt to change protected arena.")
67{
68}
69
70
71} // namespace SG
Exceptions that can be thrown from AthAllocators.
STL class.
Forward declaration.
std::string excProtection_format(int errnum)
STL namespace.