From 58fa55cf44c8b87ae3edb8f24fbac128649a7255 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 31 Mar 2022 23:52:06 -0700 Subject: Added real exceptions based on QException. These may not be stl compatible, which would be sad. They seem to work in practice, though. --- c++-qt/src/parseexception.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 c++-qt/src/parseexception.cpp (limited to 'c++-qt/src/parseexception.cpp') diff --git a/c++-qt/src/parseexception.cpp b/c++-qt/src/parseexception.cpp new file mode 100644 index 0000000..03d547a --- /dev/null +++ b/c++-qt/src/parseexception.cpp @@ -0,0 +1,31 @@ +#include "gats-qt/parseexception.h" + +Gats::ParseException::ParseException( const char * const sMessage ) : + sMessage( sMessage ) +{ +} + +Gats::ParseException::ParseException( const ParseException &rSrc ) : + sMessage( rSrc.sMessage ) +{ +} + +Gats::ParseException::~ParseException() +{ +} + +QException *Gats::ParseException::clone() const +{ + return new ParseException( *this ); +} + +void Gats::ParseException::raise() const +{ + throw *this; +} + +const char *Gats::ParseException::what() const noexcept +{ + return sMessage; +} + -- cgit v1.2.3