update function commentary

This commit is contained in:
Asif Bacchus 2019-06-18 23:11:47 -06:00
parent 13b75232bc
commit 85fe709e06

View File

@ -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"