ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthContainers
AthContainers
tools
error.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-2026 CERN for the benefit of the ATLAS collaboration
5
*/
6
19
20
21
#ifndef ATHCONTAINERS_ERROR_H
22
#define ATHCONTAINERS_ERROR_H
23
24
25
#include <format>
26
27
28
#define ATHCONTAINERS_MSG_OPEN (
29
#define ATHCONTAINERS_MSG_CLOSE )
30
#define ATHCONTAINERS_MSG(msg, ...) __VA_OPT__(std::format ATHCONTAINERS_MSG_OPEN ) msg __VA_OPT__ (, __VA_ARGS__ ATHCONTAINERS_MSG_CLOSE)
31
32
33
#ifdef XAOD_STANDALONE
34
35
#include <string>
36
#include <typeinfo>
37
38
#define ATHCONTAINERS_ERROR(ctx, msg, ...) \
39
AthContainers_detail::reportMessageStandalone(ctx, "ERROR", __FILE__, __LINE__, ATHCONTAINERS_MSG(msg __VA_OPT__ (, __VA_ARGS__)))
40
41
#define ATHCONTAINERS_WARNING(ctx, msg, ...) \
42
AthContainers_detail::reportMessageStandalone(ctx, "WARNING", __FILE__, __LINE__, ATHCONTAINERS_MSG(msg __VA_OPT__ (, __VA_ARGS__)))
43
44
45
namespace
AthContainers_detail
{
46
47
void
reportMessageStandalone (
const
std::string& context,
48
const
std::string& severity,
49
const
std::string&
file
,
int
line,
50
const
std::string&
msg
);
51
52
std::string typeinfoName (
const
std::type_info& ti);
53
54
}
// namespace AthContainers_detail
55
56
57
#else
58
59
#include "
AthenaKernel/errorcheck.h
"
60
#include "GaudiKernel/System.h"
61
62
#define ATHCONTAINERS_ERROR(ctx, msg, ...) \
63
errorcheck::ReportMessage(MSG::ERROR, __LINE__, __FILE__, "", ATLAS_PACKAGE_NAME, ctx).msgstream() << ATHCONTAINERS_MSG(msg __VA_OPT__ (, __VA_ARGS__))
64
65
#define ATHCONTAINERS_WARNING(ctx, msg, ...) \
66
errorcheck::ReportMessage(MSG::WARNING, __LINE__, __FILE__, "", ATLAS_PACKAGE_NAME, ctx).msgstream() << ATHCONTAINERS_MSG(msg __VA_OPT__ (, __VA_ARGS__))
67
68
namespace
AthContainers_detail
{
69
70
using
System::typeinfoName;
71
72
}
// namespace AthContainers_detail
73
74
#endif
// not XAOD_STANDALONE
75
76
77
#endif
// not ATHCONTAINERS_ERROR_H
errorcheck.h
Helpers for checking error return status codes and reporting errors.
AthContainers_detail
Definition
concurrent_vector.h:54
msg
MsgStream & msg
Definition
testRead.cxx:32
file
TFile * file
Definition
tile_monitor.h:29
Generated on
for ATLAS Offline Software by
1.17.0