func exitError: simplify
This commit is contained in:
parent
9e335224a0
commit
d41b0d13d3
@ -36,15 +36,8 @@ badParam () {
|
||||
}
|
||||
|
||||
exitError () {
|
||||
errCode="error_$1"
|
||||
eval errReport='$'"$errCode"
|
||||
if [ -n "$errReport" ]; then
|
||||
printf "${err}[%s] -- [ERROR] %s: %s --${norm}\n" \
|
||||
"$(stamp)" "$1" "$errReport" >> "$logFile"
|
||||
else
|
||||
printf "${err}[%s] -- [ERROR] Unknown error code reported --${norm}\n" \
|
||||
"$(stamp)" >> "$logFile"
|
||||
fi
|
||||
"$(stamp)" "$1" "$2" >> "$logFile"
|
||||
exit "$1"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user