DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
okssystem
include
okssystem
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
23
ERS_DECLARE_ISSUE
(
OksSystem
,
Exception
,
ERS_EMPTY
,
ERS_EMPTY
)
24
25
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
26
NotFoundIssue,
// issue class name
27
OksSystem
::
Exception
,
28
"Object \""
<< name <<
"\" not found"
,
// no message
29
ERS_EMPTY
,
30
((const
char
*)name)
// single attribute
31
)
32
33
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
34
PosixIssue
,
// issue class name
35
OksSystem
::
Exception
,
36
" (Error code = "
<<
error
<<
")"
,
// no message
37
ERS_EMPTY
,
38
((
int
)
error
)
// single attribute
39
)
40
41
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
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
49
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
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
58
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
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
66
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
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
74
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
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
83
ERS_DECLARE_ISSUE_BASE
(
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
93
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
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
101
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
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
109
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
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
117
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
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
125
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
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
133
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
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
ERS_EMPTY
#define ERS_EMPTY
Definition
IssueDeclarationMacro.hpp:23
Issue.hpp
Exception
Base class for all conffwk exceptions.
ERS_DECLARE_ISSUE_BASE
#define ERS_DECLARE_ISSUE_BASE(namespace_name, class_name, base_class_name, message_, base_attributes, attributes)
Definition
macro.hpp:45
ERS_DECLARE_ISSUE
#define ERS_DECLARE_ISSUE(namespace_name, class_name, message_, attributes)
Definition
macro.hpp:71
OksSystem
Definition
Descriptor.hpp:22
error
Factory couldn t std::string alg_name Invalid configuration error
Definition
Issues.hpp:34
PosixIssue
PosixIssue
Definition
exceptions.hpp:34
Generated on
for DUNE-DAQ by
1.18.0