jsondocck: Better error for invalid @count number
This commit is contained in:
parent
42b548cf9d
commit
dc6b5cb9f3
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue