DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
exceptions.hpp
Go to the documentation of this file.
1// DUNE DAQ modification notice:
2// This file has been modified from the original ATLAS system source for the DUNE DAQ project.
3// Fork baseline commit: system-00-00-20 (2020-09-25).
4// Renamed since fork: yes (from system/exceptions.h to include/okssystem/exceptions.hpp).
5
6#ifndef OKSSYSTEM_EXCEPTIONS_H
7#define OKSSYSTEM_EXCEPTIONS_H
8
9/*
10 * exceptions.h
11 * OksSystem
12 *
13 * Created by Serguei Kolos on 03.12.05.
14 * Copyright 2005 CERN. All rights reserved.
15 *
16 */
17
18#include "ers/Issue.hpp"
19#include <errno.h>
20
21#include <string>
22
24
26 NotFoundIssue, // issue class name
28 "Object \"" << name << "\" not found", // no message
30 ((const char*)name) // single attribute
31)
32
34 PosixIssue, // issue class name
36 " (Error code = " << error << ")", // no message
38 ((int)error) // single attribute
39)
40
42 AllocIssue, // issue class name
43 PosixIssue, // base class name
44 "Request for allocating " << size << " bytes of memory fails", // message
45 ((int)error), // base class attribute
46 ((int)size) // single attribute
47)
48
50 ExecutionIssue, // issue class name
51 PosixIssue, // base class name
52 "Execution of the \"" << command << "\" command fails with " << status << " status", // message
53 ((int)error), // base class attribute
54 ((const char*)command) // first attribute
55 ((int)status) // second attribute
56)
57
59 TerminationIssue, // issue class name
60 PosixIssue, // base class name
61 "Process terminated with the " << status << " status", // message
62 ((int)error), // base class attribute
63 ((int)status) // single attribute
64)
65
67 SignalIssue, // issue class name
68 PosixIssue, // base class name
69 "Process has been terminated by the " << signal << " signal", // message
70 ((int)error), // base class attribute
71 ((int)signal) // single attribute
72)
73
75 NoUserIssue, // issue class name
76 PosixIssue, // base class name
77 "User with (name:id)=(" << name << ":" << id << ") does not exist", // message
78 ((int)error), // base class attribute
79 ((const char*)name) // first attribute
80 ((int)id) // second attribute
81)
82
84 OksSystem, // namespace
85 OksSystemCallIssue, // issue class name
86 PosixIssue, // base class name
87 "OksSystem call \"" << name << "\" fails " << action, // message
88 ((int)error), // base class attribute
89 ((const char*)name) // first attribute
90 ((const char*)action) // second attribute (short description of what the okssystem call was doing)
91)
92
94 OpenFileIssue, // issue class name
95 PosixIssue, // base class name
96 "Can not open file \"" << name << "\"", // message
97 ((int)error), // base class attribute
98 ((const char*)name) // single attribute
99)
100
102 ReadIssue, // issue class name
103 PosixIssue, // base class name
104 "Can not read from file \"" << name << "\"", // message
105 ((int)error), // base class attribute
106 ((const char*)name) // single attribute
107)
108
110 WriteIssue, // issue class name
111 PosixIssue, // base class name
112 "Can not write to file \"" << name << "\"", // message
113 ((int)error), // base class attribute
114 ((const char*)name) // single attribute
115)
116
118 CloseFileIssue, // issue class name
119 PosixIssue, // base class name
120 "Can not close file \"" << name << "\"", // message
121 ((int)error), // base class attribute
122 ((const char*)name) // single attribute
123)
124
126 RemoveFileIssue, // issue class name
127 PosixIssue, // base class name
128 "Can not remove file \"" << name << "\"", // message
129 ((int)error), // base class attribute
130 ((const char*)name) // single attribute
131)
132
134 RenameFileIssue, // issue class name
135 PosixIssue, // base class name
136 "Can not rename file \"" << source << "\" to file \"" << dest << "\"", // message
137 ((int)error), // base class attribute
138 ((const char*)source) // single attribute
139 ((const char*)dest) // single attribute
140)
141
142#define OKSSYSTEM_ALLOC_CHECK(p, size) \
143 { \
144 if (0 == p) \
145 throw OksSystem::AllocIssue(ERS_HERE, errno, size); \
146 }
147
148#endif
#define ERS_EMPTY
Base class for all conffwk exceptions.
#define ERS_DECLARE_ISSUE_BASE(namespace_name, class_name, base_class_name, message_, base_attributes, attributes)
Definition macro.hpp:45
#define ERS_DECLARE_ISSUE(namespace_name, class_name, message_, attributes)
Definition macro.hpp:71
Factory couldn t std::string alg_name Invalid configuration error
Definition Issues.hpp:34
PosixIssue