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