From 88dc6ac6daea0f0a16c7cf8a1e32d509121ff15c Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 2 Jun 2015 16:08:41 +0200 Subject: throw error when trying to set or append the string part of "*" and appending to "$" * these operations are unsupported and there is no benefit in ignoring them silently. It only confused the user. --- src/qregisters.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'src/qregisters.h') diff --git a/src/qregisters.h b/src/qregisters.h index 1ef0564..2933dc8 100644 --- a/src/qregisters.h +++ b/src/qregisters.h @@ -28,6 +28,7 @@ #include #include "sciteco.h" +#include "error.h" #include "interface.h" #include "ioview.h" #include "undo.h" @@ -177,9 +178,18 @@ public: tecoInt get_integer(void); - void set_string(const gchar *str, gsize len) {} + void + set_string(const gchar *str, gsize len) + { + throw QRegOpUnsupportedError(name); + } void undo_set_string(void) {} - void append_string(const gchar *str, gsize len) {} + + void + append_string(const gchar *str, gsize len) + { + throw QRegOpUnsupportedError(name); + } void undo_append_string(void) {} gchar *get_string(void); @@ -195,7 +205,12 @@ public: void set_string(const gchar *str, gsize len); void undo_set_string(void); - void append_string(const gchar *str, gsize len) {} + + void + append_string(const gchar *str, gsize len) + { + throw QRegOpUnsupportedError(name); + } void undo_append_string(void) {} gchar *get_string(void); -- cgit v1.2.3