From 8046e11445ba71b767d4fde08ce1e43e0dcd0359 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 2 Jun 2013 13:47:19 +0200 Subject: 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 --- src/parser.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/parser.h') 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) -- cgit v1.2.3