Line data Source code
1 : /**
2 : * @file anlExceptions.h
3 :
4 : * This is part of the DUNE DAQ , copyright 2020.
5 : * Licensing/copyright details are in the COPYING file that you should have
6 : * received with this code.
7 : */
8 : #ifndef SSPMODULES_SRC_ANLBOARD_ANLEXCEPTIONS_HPP_
9 : #define SSPMODULES_SRC_ANLBOARD_ANLEXCEPTIONS_HPP_
10 :
11 : #include <stdexcept>
12 : #include <string>
13 :
14 : namespace dunedaq {
15 : namespace sspmodules {
16 :
17 : //================================//
18 : // Bad requests from Device Manager//
19 : //================================//
20 :
21 : class ENoSuchDevice : public std::runtime_error
22 : {
23 : public:
24 : explicit ENoSuchDevice(const std::string& s)
25 : : std::runtime_error(s)
26 : {}
27 :
28 0 : ENoSuchDevice()
29 0 : : std::runtime_error("")
30 0 : {}
31 : };
32 :
33 : class EDeviceAlreadyOpen : public std::runtime_error
34 : {
35 : public:
36 : explicit EDeviceAlreadyOpen(const std::string& s)
37 : : std::runtime_error(s)
38 : {}
39 :
40 0 : EDeviceAlreadyOpen()
41 0 : : std::runtime_error("")
42 0 : {}
43 : };
44 :
45 : class EBadDeviceList : public std::runtime_error
46 : {
47 : public:
48 : explicit EBadDeviceList(const std::string& s)
49 : : std::runtime_error(s)
50 : {}
51 :
52 : EBadDeviceList()
53 : : std::runtime_error("")
54 : {}
55 : };
56 :
57 : //=======================================//
58 : // Error reported by USB interface library//
59 : //=======================================//
60 :
61 : class EFTDIError : public std::runtime_error
62 : {
63 : public:
64 : explicit EFTDIError(const std::string& s)
65 : : std::runtime_error(s)
66 : {}
67 :
68 : EFTDIError()
69 : : std::runtime_error("")
70 : {}
71 : };
72 :
73 : //=======================================//
74 : // Error reported by TCP interface library//
75 : //=======================================//
76 :
77 : class ETCPError : public std::runtime_error
78 : {
79 : public:
80 0 : explicit ETCPError(const std::string& s)
81 0 : : std::runtime_error(s)
82 0 : {}
83 :
84 : ETCPError()
85 : : std::runtime_error("")
86 : {}
87 : };
88 :
89 : //===============================================//
90 : // Error receiving expected event data from device//
91 : //===============================================//
92 :
93 : class EEventReadError : public std::runtime_error
94 : {
95 : public:
96 : explicit EEventReadError(const std::string& s)
97 : : std::runtime_error(s)
98 : {}
99 :
100 : EEventReadError()
101 : : std::runtime_error("")
102 : {}
103 : };
104 :
105 : class EDAQConfigError : public std::runtime_error
106 : {
107 : public:
108 : explicit EDAQConfigError(const std::string& s)
109 : : std::runtime_error(s)
110 : {}
111 :
112 : EDAQConfigError()
113 : : std::runtime_error("")
114 : {}
115 : };
116 :
117 : } // namespace sspmodules
118 : } // namespace dunedaq
119 :
120 : #endif // SSPMODULES_SRC_ANLBOARD_ANLEXCEPTIONS_HPP_
|