From 4048ee8150cad5253fd6f0245c9a357484eac3f2 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 11 Nov 2014 15:09:21 +0100 Subject: refactored SciTECO runtime errors: moved from parser.cpp to error.cpp * the GError expection has been renamed to GlibError, to avoid nameclashes when working from the SciTECO namespace --- src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 9300b40..ed46747 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -41,6 +41,7 @@ #include "qregisters.h" #include "ring.h" #include "undo.h" +#include "error.h" namespace SciTECO { @@ -360,8 +361,8 @@ main(int argc, char **argv) if (eval_macro) { try { Execute::macro(eval_macro, false); - } catch (State::Error &error) { - error.add_frame(new State::Error::ToplevelFrame()); + } catch (Error &error) { + error.add_frame(new Error::ToplevelFrame()); throw; /* forward */ } exit(EXIT_SUCCESS); @@ -377,7 +378,7 @@ main(int argc, char **argv) } } g_free(mung_file); - } catch (State::Error &error) { + } catch (Error &error) { error.display_full(); exit(EXIT_FAILURE); } catch (...) { -- cgit v1.2.3