diff options
Diffstat (limited to 'src/voltronic/exceptions.h')
-rw-r--r-- | src/voltronic/exceptions.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/voltronic/exceptions.h b/src/voltronic/exceptions.h index 6ae9c32..bae4426 100644 --- a/src/voltronic/exceptions.h +++ b/src/voltronic/exceptions.h @@ -7,6 +7,10 @@ namespace voltronic { +// ---------- +// exceptions +// ---------- + class DeviceError : public std::runtime_error { public: using std::runtime_error::runtime_error; @@ -22,6 +26,24 @@ public: using std::runtime_error::runtime_error; }; +class OverflowError : public std::overflow_error { +public: + using std::overflow_error::overflow_error; +}; + + +// --------------- +// exception types +// --------------- + +enum class ErrorType { + None = 0, + DeviceError, + TimeoutError, + InvalidDataError, + OverflowError, +}; + } #endif //INVERTER_TOOLS_VOLTRONIC_EXCEPTIONS_H |