IOLink IOL_v1.8.0_release
Loading...
Searching...
No Matches
Error.h
1#pragma once
2
3#include <iolink/IOLinkAPI.h>
4#include <exception>
5#include <string>
6
7namespace iolink
8{
12class IOLINK_API Error : public std::exception
13{
14public:
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
27private:
28 std::string m_msg;
29};
30
35class IOLINK_API InvalidArgument final : public Error
36{
37public:
38 explicit InvalidArgument(const std::string& msg);
39};
40
46class IOLINK_API NotImplemented final : public Error
47{
48public:
49 explicit NotImplemented(const std::string& function);
50};
51
52} // end namespace iolink