aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmdline.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-16 18:57:34 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-16 18:57:34 +0100
commit597497938a96b14f327345adb00dfcfd080208a3 (patch)
treed5ce78df6c5a234dc0ffa19c6357d805555f5122 /cmdline.cpp
parentde99e1068e3158866c0a537c27f035ae3d350d1a (diff)
downloadsciteco-597497938a96b14f327345adb00dfcfd080208a3.tar.gz
support different kinds of runtime errors (using C++ exceptions)
* also added some additional range checks (e.g. X command)
Diffstat (limited to 'cmdline.cpp')
-rw-r--r--cmdline.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmdline.cpp b/cmdline.cpp
index 5c6c14b..e2103ac 100644
--- a/cmdline.cpp
+++ b/cmdline.cpp
@@ -56,7 +56,9 @@ cmdline_keypress(gchar key)
for (const gchar *p = insert; *p; p++) {
strcat(cmdline, (gchar[]){*p, '\0'});
- if (!macro_execute(cmdline)) {
+ try {
+ macro_execute(cmdline);
+ } catch (...) {
cmdline[old_cmdline_len] = '\0';
break;
}