libs: made error message clearer and more consistent

This commit is contained in:
levasseur
2021-12-13 18:49:03 +01:00
parent bbd35ee3c6
commit d9af921417
6 changed files with 17 additions and 12 deletions

View File

@@ -152,7 +152,7 @@ isdirempty()
dir=$1
if [[ -f $dir ]]; then
prnt E "isdirempty():The given parameter is not a directory."
prnt E "isdirempty(): The given parameter is not a directory."
die 15
fi
if [[ ! -d $dir ]]; then
@@ -177,7 +177,7 @@ patchfile()
local workfile=${dstfile}.work
if [[ ! -s $srcfile ]]; then
prnt E "The source file is empty, is not a file or don't exists!"
prnt E "patchfile(): Source file is empty, is not a file or don't exists!"
die 10
fi
@@ -218,7 +218,7 @@ file_exists()
prnt I "Checking $@ files existance..."
for f in $@; do
if [[ ! -f $(select_file $f) ]]; then
prnt E "The $f file is missing, cannot continue."
prnt E "file_exists(): The $f file is missing, can't continue."
die 10
fi
done