aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parser.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2013-06-02 13:47:19 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2014-02-15 15:21:54 +0100
commit8046e11445ba71b767d4fde08ce1e43e0dcd0359 (patch)
treed6991bb858a91336e76831b8dbd39c28345f21a9 /src/parser.h
parent78ad52e40992d6e68238dc1574d4ae6c6f922d27 (diff)
downloadsciteco-8046e11445ba71b767d4fde08ce1e43e0dcd0359.tar.gz
use GLib's GError information to yield errors
* results in better error messages, e.g. when opening files * the case that a file to be opened (EB) exists but is not readably is handled for the first time
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/parser.h b/src/parser.h
index f7c9bed..8e73d64 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -156,6 +156,12 @@ public:
void display_full(void);
};
+ class GError : public Error {
+ public:
+ GError(const ::GError *gerror)
+ : Error("%s", gerror->message) {}
+ };
+
class SyntaxError : public Error {
public:
SyntaxError(gchar chr)