Better error message when a number that isn't recognized as a day number or year is encountered.

This commit is contained in:
Dianne Skoll
2024-09-10 13:57:34 -04:00
parent 019bee26cb
commit ef6b9c3783
3 changed files with 9 additions and 0 deletions

View File

@@ -542,6 +542,12 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
if (r) return r;
break;
case T_Number:
DBufFree(&buf);
Eprint("Number `%d' is not recognized as a year or a day number",
tok.val);
return E_PARSE_ERR;
case T_Year:
DBufFree(&buf);
if (trig->y != NO_YR) return E_YR_TWICE;

View File

@@ -5699,6 +5699,8 @@ set zxk dooby(1)
Entering UserFN dooby(1)
Leaving UserFN dooby(1) => 1
REM 1 Jan 1873 MSG hehah
../tests/test.rem(1122): Number `1873' is not recognized as a year or a day number
# Don't want Remind to queue reminders
EXIT

View File

@@ -1119,6 +1119,7 @@ set zxk dooby()
set zxk dooby(1, 2)
set zxk dooby(1)
REM 1 Jan 1873 MSG hehah
# Don't want Remind to queue reminders
EXIT