| IOLink 1.11.0

Loading...
Searching...
No Matches
Error.h
1#pragma once
2
3#include <iolink/IOLinkAPI.h>
4#include <exception>
5#include <string>
6
7 namespace iolink
8{
12 class IOLINK_API Error : public std::exception
13{
14 public:
15 explicit Error(const std::string& msg);
16
17 const char* what() const noexcept override;
18
19 ~Error() = default;
20
21 Error(const Error& other) = default;
22 Error& operator=(const Error& other) = default;
23
24 Error(Error&& other) noexcept = default;
25 Error& operator=(Error&& other) noexcept = default;
26
27 private:
28 std::string m_msg;
29};
30
35 class IOLINK_API InvalidArgument final : public Error
36{
37 public:
38 explicit InvalidArgument(const std::string& msg);
39};
40
46 class IOLINK_API NotImplemented final : public Error
47{
48 public:
49 explicit NotImplemented(const std::string& function);
50};
51
52} // end namespace iolink
iolink::Error
Error base class.
Definition Error.h:13
iolink::InvalidArgument
'Invalid argument' error raised when an argument is not the one expected in a public method.
Definition Error.h:36
iolink::NotImplemented
'Not implemented' error raised when a 'not available' method is called.
Definition Error.h:47
iolink
All IOLink symbols are enclosed in this namespace.
Definition ArrayX.h:8