From ff0a3b3aa6d1c55f0beec9b59ff7284a97e50f6d Mon Sep 17 00:00:00 2001 From: David Horstmann Date: Wed, 20 Oct 2021 14:04:02 +0100 Subject: [PATCH] Improve error message in generate_query_config.pl Add usage information to the ARGV-incorrect-length error message in generate_query_config.pl. A plain usage message looks a bit incongruous when raised as an error, but the error message alone is unhelpful. Signed-off-by: David Horstmann --- scripts/generate_query_config.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_query_config.pl b/scripts/generate_query_config.pl index b56502471..7855c7caa 100755 --- a/scripts/generate_query_config.pl +++ b/scripts/generate_query_config.pl @@ -37,7 +37,7 @@ use strict; my ($config_file, $query_config_format_file, $query_config_file); if( @ARGV ) { - die "Invalid number of arguments" if scalar @ARGV != 3; + die "Invalid number of arguments - usage: $0 [CONFIG_FILE TEMPLATE_FILE OUTPUT_FILE]" if scalar @ARGV != 3; ($config_file, $query_config_format_file, $query_config_file) = @ARGV; -f $config_file or die "No such file: $config_file";