update function commentary
This commit is contained in:
parent
13b75232bc
commit
85fe709e06
@ -83,6 +83,7 @@ cleanup () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# call cleanup and then exit with error report
|
||||||
exitError () {
|
exitError () {
|
||||||
printf "${err}[%s] -- [ERROR] %s: %s --${norm}\n" \
|
printf "${err}[%s] -- [ERROR] %s: %s --${norm}\n" \
|
||||||
"$(stamp)" "$1" "$2" >> "$logFile"
|
"$(stamp)" "$1" "$2" >> "$logFile"
|
||||||
@ -129,6 +130,7 @@ stamp () {
|
|||||||
(date +%F" "%T)
|
(date +%F" "%T)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# same as exitError but for signal captures
|
||||||
trapExit () {
|
trapExit () {
|
||||||
printf "${err}[%s] -- [ERROR] 99: Caught signal --${norm}\n" \
|
printf "${err}[%s] -- [ERROR] 99: Caught signal --${norm}\n" \
|
||||||
"$(stamp)" >> "$logFile"
|
"$(stamp)" >> "$logFile"
|
||||||
|
Loading…
Reference in New Issue
Block a user