diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-03-28 17:37:49 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-02-15 15:21:52 +0100 |
commit | d374448af8ab690c810757f73ba44f208db96f30 (patch) | |
tree | 48e15c42d7a01b10aaef51d0113572ea53fec797 /src/cmdline.cpp | |
parent | 6d4668bdaf393aa45d9adb640774f998c6b4aa58 (diff) | |
download | sciteco-d374448af8ab690c810757f73ba44f208db96f30.tar.gz |
added support for TECO stack tracing
* when an error is thrown, stack frames are collected on clean up, up to
the toplevel macro
* the toplevel macro decides how to display the error
* now errors in interactive and batch mode are displayed differently
* in batch mode, a backtrace is displayed as a sequence of messages
* Execute::file() forwards errors correctly
* the correct error in the file is displayed in interactive mode
* necessary to build the stack trace
Diffstat (limited to 'src/cmdline.cpp')
-rw-r--r-- | src/cmdline.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmdline.cpp b/src/cmdline.cpp index c6dcf2a..641b062 100644 --- a/src/cmdline.cpp +++ b/src/cmdline.cpp @@ -97,7 +97,10 @@ cmdline_keypress(gchar key) cmdline_pos = repl_pos = r.pos; macro_pc = r.pos-1; continue; - } catch (...) { + } catch (State::Error &error) { + error.add_frame(new State::Error::ToplevelFrame()); + error.display_short(); + if (old_cmdline) { undo.pop(repl_pos); |