Skip to content

Commit

Permalink
Tell user the reason for a failure
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
perlpunk committed Sep 3, 2024
1 parent 01cdac6 commit 1091da9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/OpenQA/Schema.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 1091da9

Please sign in to comment.