aboutsummaryrefslogtreecommitdiff
path: root/c++-qt/src/parseexception.cpp
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2022-03-31 23:52:06 -0700
committerMike Buland <mike@xagasoft.com>2022-03-31 23:52:06 -0700
commit58fa55cf44c8b87ae3edb8f24fbac128649a7255 (patch)
tree5e879a71edffc7dcabb242dece0212723d90c64d /c++-qt/src/parseexception.cpp
parentbee0b9c862d5eb325b8c29767a89b3d895b5f5a9 (diff)
downloadlibgats-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.cpp31
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
3Gats::ParseException::ParseException( const char * const sMessage ) :
4 sMessage( sMessage )
5{
6}
7
8Gats::ParseException::ParseException( const ParseException &rSrc ) :
9 sMessage( rSrc.sMessage )
10{
11}
12
13Gats::ParseException::~ParseException()
14{
15}
16
17QException *Gats::ParseException::clone() const
18{
19 return new ParseException( *this );
20}
21
22void Gats::ParseException::raise() const
23{
24 throw *this;
25}
26
27const char *Gats::ParseException::what() const noexcept
28{
29 return sMessage;
30}
31