aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/error.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.h')
-rw-r--r--src/error.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/error.h b/src/error.h
index 2df7b89..c51f528 100644
--- a/src/error.h
+++ b/src/error.h
@@ -39,6 +39,7 @@ typedef enum {
* They will mainly be different in their error message.
*/
TECO_ERROR_SYNTAX,
+ TECO_ERROR_MODIFIER,
TECO_ERROR_ARGEXPECTED,
TECO_ERROR_CODEPOINT,
TECO_ERROR_MOVE,
@@ -74,6 +75,13 @@ teco_error_syntax_set(GError **error, gunichar chr)
}
static inline void
+teco_error_modifier_set(GError **error, gchar modifier)
+{
+ g_set_error(error, TECO_ERROR, TECO_ERROR_MODIFIER,
+ "Excess \"%c\"-modifier", modifier);
+}
+
+static inline void
teco_error_argexpected_set(GError **error, const gchar *cmd)
{
g_set_error(error, TECO_ERROR, TECO_ERROR_ARGEXPECTED,