DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
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
20
22 NotFoundIssue, // issue class name
23 OksSystem::Exception,
24 "Object \"" << name << "\" not found", // no message
26 ((const char *)name ) // single attribute
27 )
28
30 PosixIssue, // issue class name
31 OksSystem::Exception,
32 " (Error code = " << error << ")", // no message
34 ((int)error ) // single attribute
35 )
36
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
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
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
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
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
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
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
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
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
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
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
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
#define ERS_DECLARE_ISSUE_BASE(namespace_name, class_name, base_class_name, message, base_attributes, attributes)
#define ERS_DECLARE_ISSUE(namespace_name, class_name, message, attributes)
#define ERS_EMPTY
Factory couldn t std::string alg_name Invalid configuration error
Definition Issues.hpp:34
PosixIssue