From f335be76de582777acb6cc177e2a5af61c805964 Mon Sep 17 00:00:00 2001 From: Karchnu Date: Mon, 26 Oct 2020 19:24:57 +0100 Subject: [PATCH] Parser: now gives a better understanding of the error. --- utils/better-parser.cr | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/better-parser.cr b/utils/better-parser.cr index f6263ca..c266e8b 100644 --- a/utils/better-parser.cr +++ b/utils/better-parser.cr @@ -56,6 +56,8 @@ unrecognized_args_to_context_args = -> (parser : OptionParser, n_expected_args : # With the right args, these will be interpreted as serialized data. parser.unknown_args do |args| if args.size != n_expected_args + Baguette::Log.error "expected number of arguments: #{n_expected_args}, received: #{args.size}" + Baguette::Log.error "args: #{args}" Baguette::Log.error "#{parser}" exit 1 end