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
1 changed files with 6 additions and 4 deletions

View File

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