jsondocck: Better error for invalid @count number

This commit is contained in:
Nixon Enraght-Moony 2022-03-10 15:55:38 +00:00
parent 42b548cf9d
commit dc6b5cb9f3

View File

@ -73,7 +73,10 @@ impl CommandKind {
if let CommandKind::Count = self {
if args[2].parse::<usize>().is_err() {
print_err(&format!("Third argument to @count must be a valid usize"), lineno);
print_err(
&format!("Third argument to @count must be a valid usize (got `{}`)", args[2]),
lineno,
);
return false;
}
}