ATLAS Offline Software
Loading...
Searching...
No Matches
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-2024 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#ifdef XAOD_STANDALONE
26
27#include <string>
28#include <typeinfo>
29
30#define ATHCONTAINERS_ERROR(ctx, msg) \
31 AthContainers_detail::reportMessageStandalone(ctx, "ERROR", __FILE__, __LINE__, msg)
32
33#define ATHCONTAINERS_WARNING(ctx, msg) \
34 AthContainers_detail::reportMessageStandalone(ctx, "WARNING", __FILE__, __LINE__, msg)
35
36
37namespace AthContainers_detail {
38
39void reportMessageStandalone (const std::string& context,
40 const std::string& severity,
41 const std::string& file, int line,
42 const std::string& msg);
43
44std::string typeinfoName (const std::type_info& ti);
45
46} // namespace AthContainers_detail
47
48
49#else
50
52#include "GaudiKernel/System.h"
53
54#define ATHCONTAINERS_ERROR(ctx, msg) \
55 errorcheck::ReportMessage(MSG::ERROR, __LINE__, __FILE__, "", ATLAS_PACKAGE_NAME, ctx).msgstream() << msg
56
57#define ATHCONTAINERS_WARNING(ctx, msg) \
58 errorcheck::ReportMessage(MSG::WARNING, __LINE__, __FILE__, "", ATLAS_PACKAGE_NAME, ctx).msgstream() << msg
59
60namespace AthContainers_detail {
61
62using System::typeinfoName;
63
64} // namespace AthContainers_detail
65
66#endif // not XAOD_STANDALONE
67
68
69#endif // not ATHCONTAINERS_ERROR_H
Helpers for checking error return status codes and reporting errors.
std::string typeinfoName(const std::type_info &ti)
Convert a type_info to a demangled string.
MsgStream & msg
Definition testRead.cxx:32
TFile * file