diff options
Diffstat (limited to 'src/voltronic/exceptions.h')
-rw-r--r-- | src/voltronic/exceptions.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/voltronic/exceptions.h b/src/voltronic/exceptions.h new file mode 100644 index 0000000..6ae9c32 --- /dev/null +++ b/src/voltronic/exceptions.h @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#ifndef INVERTER_TOOLS_VOLTRONIC_EXCEPTIONS_H +#define INVERTER_TOOLS_VOLTRONIC_EXCEPTIONS_H + +#include <stdexcept> + +namespace voltronic { + +class DeviceError : public std::runtime_error { +public: + using std::runtime_error::runtime_error; +}; + +class TimeoutError : public std::runtime_error { +public: + using std::runtime_error::runtime_error; +}; + +class InvalidDataError : public std::runtime_error { +public: + using std::runtime_error::runtime_error; +}; + +} + +#endif //INVERTER_TOOLS_VOLTRONIC_EXCEPTIONS_H |