From fa128671e2c4115f79200e69bde21a1bd484cad9 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 9 Nov 2014 22:56:50 +0100 Subject: revised U command: fail if no argument is provided * there is no reasonable default value for U * omitting the parameter for U might be a frequent programming error * U can be colon-modified now, in which case it may be used * to check for the presence of arguments in macros --- src/parser.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/parser.h') diff --git a/src/parser.h b/src/parser.h index c19ef14..9cc8f07 100644 --- a/src/parser.h +++ b/src/parser.h @@ -179,6 +179,14 @@ public: : Error("Syntax error \"%c\" (%d)", chr, chr) {} }; + class ArgExpectedError : public Error { + public: + ArgExpectedError(const gchar *cmd) + : Error("Argument expected for <%s>", cmd) {} + ArgExpectedError(gchar cmd) + : Error("Argument expected for <%c>", cmd) {} + }; + class MoveError : public Error { public: MoveError(const gchar *cmd) -- cgit v1.2.3