Mercurial > public > ostc_companion
diff Utils/Exception.h @ 2:177f640940f2
Update exception class and cleanup redifinitions
During firmware download and exception caused the application to stop.
Rootcause was the defference between QT5 and QT6 exception and string
handling which is updated now. In addition some old definitions were
removed to avoid compiler warnings.
| author | Ideenmodellierer |
|---|---|
| date | Fri, 28 Nov 2025 19:57:35 +0100 |
| parents | 0b3630a29ad8 |
| children |
line wrap: on
line diff
--- a/Utils/Exception.h Thu Nov 27 18:40:28 2025 +0100 +++ b/Utils/Exception.h Fri Nov 28 19:57:35 2025 +0100 @@ -51,6 +51,7 @@ # define EXPORT __declspec(dllimport) #endif +#if 0 class EXPORT Exception : public std::exception { @@ -65,6 +66,18 @@ /// Message contains, in UTF8 format. const char* what() const throw() override; }; +#endif + +class EXPORT Exception : public std::exception { +public: + explicit Exception(const QString& msg); + explicit Exception(const char* msg); + + const char* what() const noexcept override; + +private: + std::string _msg; +}; //////////////////////////////////////////////////////////////////////////////
