From dc6b5cb9f3a554a2a9016e819cb2760b68bd663e Mon Sep 17 00:00:00 2001 From: Nixon Enraght-Moony Date: Thu, 10 Mar 2022 15:55:38 +0000 Subject: [PATCH] jsondocck: Better error for invalid @count number --- src/tools/jsondocck/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/jsondocck/src/main.rs b/src/tools/jsondocck/src/main.rs index c5358e2f53a..c4462466646 100644 --- a/src/tools/jsondocck/src/main.rs +++ b/src/tools/jsondocck/src/main.rs @@ -73,7 +73,10 @@ impl CommandKind { if let CommandKind::Count = self { if args[2].parse::().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; } }