diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-11 15:09:21 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-11 15:09:21 +0100 |
commit | 4048ee8150cad5253fd6f0245c9a357484eac3f2 (patch) | |
tree | 2434df63c0766d6c2f8f8294af9104697f4abae2 /src/main.cpp | |
parent | 7206f6d1249da0dd8e879d0c0b26185fc6ef89d9 (diff) | |
download | sciteco-4048ee8150cad5253fd6f0245c9a357484eac3f2.tar.gz |
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
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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 (...) { |