From 4b96ada5f082e0f06fd73963e036c47d9c0bd496 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 17 Nov 2021 17:37:03 +0000 Subject: [PATCH] Scripts: Better error messages --- definitions/add_params_from_tsv.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/definitions/add_params_from_tsv.pl b/definitions/add_params_from_tsv.pl index 6204c149e..bcd61def4 100755 --- a/definitions/add_params_from_tsv.pl +++ b/definitions/add_params_from_tsv.pl @@ -120,9 +120,9 @@ if ($SANITY_CHECK) { die "Error: paramId=$paramId is not an integer (line ", $lcount+1, ")\n" if (!is_integer($paramId)); my $x = $dbh->selectrow_array("select * from param.param where id = ?",undef,$paramId); - die "Error: paramId=$x already exists (line ", $lcount+1, ")\n" if (defined $x); + die "Error: paramId=$x exists in the database (line ", $lcount+1, ")\n" if (defined $x); $x = $dbh->selectrow_array("select shortName from param.param where shortName = ?",undef,$shortName); - die "Error: shortName=$x already exists (line ", $lcount+1, ")\n" if (defined $x); + die "Error: shortName=$x exists in the database (line ", $lcount+1, ")\n" if (defined $x); } print "\nSanity checking completed. $lcount rows checked. No errors.\nExiting.\n"; exit 0;