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
23
25
27 NotFoundIssue, // issue class name
28 OksSystem::Exception,
29 "Object \"" << name << "\" not found", // no message
31 ((const char *)name ) // single attribute
32 )
33
35 PosixIssue, // issue class name
36 OksSystem::Exception,
37 " (Error code = " << error << ")", // no message
39 ((int)error ) // single attribute
40 )
41
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
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
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
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
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
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{ if(0==p) throw OksSystem::AllocIssue( ERS_HERE, errno, size ); }
144
145#endif
#define ERS_EMPTY
#define ERS_DECLARE_ISSUE( namespace_name, class_name, message_, attributes)
Definition macro.hpp:65
#define ERS_DECLARE_ISSUE_BASE( namespace_name, class_name, base_class_name, message_, base_attributes, attributes)
Definition macro.hpp:45
Factory couldn t std::string alg_name Invalid configuration error
Definition Issues.hpp:34
PosixIssue