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
24
ERS_DECLARE_ISSUE
(
OksSystem
, Exception,
ERS_EMPTY
,
ERS_EMPTY
)
25
26
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
27
NotFoundIssue,
// issue class name
28
OksSystem
::Exception,
29
"Object \""
<< name <<
"\" not found"
,
// no message
30
ERS_EMPTY
,
31
((const
char
*)name )
// single attribute
32
)
33
34
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
35
PosixIssue
,
// issue class name
36
OksSystem
::Exception,
37
" (Error code = "
<<
error
<<
")"
,
// no message
38
ERS_EMPTY
,
39
((
int
)
error
)
// single attribute
40
)
41
42
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
43
AllocIssue,
// issue class name
44
PosixIssue
,
// base class name
45
"Request for allocating "
<< size <<
" bytes of memory fails"
,
// message
46
((
int
)
error
),
// base class attribute
47
((
int
)size )
// single attribute
48
)
49
50
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
51
ExecutionIssue,
// issue class name
52
PosixIssue
,
// base class name
53
"Execution of the \""
<< command <<
"\" command fails with "
<< status <<
" status"
,
// message
54
((
int
)
error
),
// base class attribute
55
((const
char
*)command )
// first attribute
56
((
int
)status )
// second attribute
57
)
58
59
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
60
TerminationIssue,
// issue class name
61
PosixIssue
,
// base class name
62
"Process terminated with the "
<< status <<
" status"
,
// message
63
((
int
)
error
),
// base class attribute
64
((
int
)status )
// single attribute
65
)
66
67
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
68
SignalIssue,
// issue class name
69
PosixIssue
,
// base class name
70
"Process has been terminated by the "
<< signal <<
" signal"
,
// message
71
((
int
)
error
),
// base class attribute
72
((
int
)signal )
// single attribute
73
)
74
75
ERS_DECLARE_ISSUE_BASE
(
OksSystem
,
// namespace
76
NoUserIssue,
// issue class name
77
PosixIssue
,
// base class name
78
"User with (name:id)=("
<< name <<
":"
<<
id
<<
") does not exist"
,
// message
79
((
int
)
error
),
// base class attribute
80
((const
char
*)name )
// first attribute
81
((
int
)
id
)
// second attribute
82
)
83
84
ERS_DECLARE_ISSUE_BASE
(
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
{ if(0==p) throw OksSystem::AllocIssue( ERS_HERE, errno, size ); }
144
145
#endif
ERS_EMPTY
#define ERS_EMPTY
Definition
IssueDeclarationMacro.hpp:22
Issue.hpp
ERS_DECLARE_ISSUE
#define ERS_DECLARE_ISSUE( namespace_name, class_name, message_, attributes)
Definition
macro.hpp:65
ERS_DECLARE_ISSUE_BASE
#define ERS_DECLARE_ISSUE_BASE( namespace_name, class_name, base_class_name, message_, base_attributes, attributes)
Definition
macro.hpp:45
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:35
Generated on
for DUNE-DAQ by
1.17.0