From c25348dddab9516af44c3ae32db55cdd7e68e176 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Mon, 27 May 2019 05:24:26 -0600 Subject: [PATCH] split long error messages into separate vars --- backup_new.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/backup_new.sh b/backup_new.sh index dcf875f..ee0b079 100755 --- a/backup_new.sh +++ b/backup_new.sh @@ -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"