From 1091da95ec1cb76b45d036121868520ff721cc5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tina=20M=C3=BCller?= Date: Tue, 3 Sep 2024 20:32:28 +0200 Subject: [PATCH] Tell user the reason for a failure Exclamation marks in error messages are most useful if you add a dollar sign before them! Also avoid things like "can't" and "don't" in error messages. --- lib/OpenQA/Schema.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenQA/Schema.pm b/lib/OpenQA/Schema.pm index e5c6283dd85..a21512bf510 100644 --- a/lib/OpenQA/Schema.pm +++ b/lib/OpenQA/Schema.pm @@ -59,8 +59,8 @@ sub deploy ($self, $force_overwrite = 0) { my $dblock; # LOCK_EX works most reliably if the file is open with write intent - open($dblock, '>>', $dblockfile) or die "Can't open database lock file ${dblockfile}!"; - flock($dblock, LOCK_EX) or die "Can't lock database lock file ${dblockfile}!"; + open($dblock, '>>', $dblockfile) or die "Cannot open database lock file ${dblockfile}: $!"; + flock($dblock, LOCK_EX) or die "Cannot lock database lock file ${dblockfile}: $!"; my $dir = $FindBin::Bin; while (abs_path($dir) ne '/') { last if (-d "$dir/dbicdh");