diff options
author | Mike Buland <mike@xagasoft.com> | 2022-03-31 23:52:06 -0700 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2022-03-31 23:52:06 -0700 |
commit | 58fa55cf44c8b87ae3edb8f24fbac128649a7255 (patch) | |
tree | 5e879a71edffc7dcabb242dece0212723d90c64d /c++-qt/src/parseexception.cpp | |
parent | bee0b9c862d5eb325b8c29767a89b3d895b5f5a9 (diff) | |
download | libgats-58fa55cf44c8b87ae3edb8f24fbac128649a7255.tar.gz libgats-58fa55cf44c8b87ae3edb8f24fbac128649a7255.tar.bz2 libgats-58fa55cf44c8b87ae3edb8f24fbac128649a7255.tar.xz libgats-58fa55cf44c8b87ae3edb8f24fbac128649a7255.zip |
Added real exceptions based on QException.
These may not be stl compatible, which would be sad. They seem to work
in practice, though.
Diffstat (limited to 'c++-qt/src/parseexception.cpp')
-rw-r--r-- | c++-qt/src/parseexception.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
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 @@ | |||
1 | #include "gats-qt/parseexception.h" | ||
2 | |||
3 | Gats::ParseException::ParseException( const char * const sMessage ) : | ||
4 | sMessage( sMessage ) | ||
5 | { | ||
6 | } | ||
7 | |||
8 | Gats::ParseException::ParseException( const ParseException &rSrc ) : | ||
9 | sMessage( rSrc.sMessage ) | ||
10 | { | ||
11 | } | ||
12 | |||
13 | Gats::ParseException::~ParseException() | ||
14 | { | ||
15 | } | ||
16 | |||
17 | QException *Gats::ParseException::clone() const | ||
18 | { | ||
19 | return new ParseException( *this ); | ||
20 | } | ||
21 | |||
22 | void Gats::ParseException::raise() const | ||
23 | { | ||
24 | throw *this; | ||
25 | } | ||
26 | |||
27 | const char *Gats::ParseException::what() const noexcept | ||
28 | { | ||
29 | return sMessage; | ||
30 | } | ||
31 | |||