split long error messages into separate vars

This commit is contained in:
Asif Bacchus 2019-05-27 05:24:26 -06:00
parent 5e5e50b8e8
commit c25348ddda

View File

@ -552,8 +552,9 @@ elif [ "$borgResult" -eq 1 ]; then
"$(stamp)" >> "$logFile" "$(stamp)" >> "$logFile"
printf "Review this logfile for details --${norm}\n" >> "$logFile" printf "Review this logfile for details --${norm}\n" >> "$logFile"
elif [ "$borgResult" -ge 2 ]; then elif [ "$borgResult" -ge 2 ]; then
exitError 138 "Borg exited with a critical error. \ err_1="Borg exited with a critical error. Please review this log file"
Review this log for details" err_2="for details."
exitError 138 "$err_1 $err_2"
else else
printf "${warn}[%s] -- [WARNING] Borg exited with uknown return code. " \ printf "${warn}[%s] -- [WARNING] Borg exited with uknown return code. " \
"$(stamp)" >> "$logFile" "$(stamp)" >> "$logFile"
@ -585,8 +586,9 @@ if [ -n "${borgPruneResult}" ]; then
"$(stamp)" >> "$logFile" "$(stamp)" >> "$logFile"
printf "Review this logfile for details --${norm}\n" >> "$logFile" printf "Review this logfile for details --${norm}\n" >> "$logFile"
elif [ "$borgPruneResult" -ge 2 ]; then elif [ "$borgPruneResult" -ge 2 ]; then
exitError 139 "Borg prune exited with a critical error. \ err_1="Borg prune exited with a critical error. Please review this"
Review this log for details" err_2="log file for details."
exitError 139 "$err_1 $err_2"
else else
printf "${warn}[%s] -- [WARNING] Borg prune exited with an unknown " \ printf "${warn}[%s] -- [WARNING] Borg prune exited with an unknown " \
"$(stamp)" >> "$logFile" "$(stamp)" >> "$logFile"