diff options
Diffstat (limited to 'lib/backup/files.rb')
-rw-r--r-- | lib/backup/files.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/backup/files.rb b/lib/backup/files.rb index 42cfff98239..4e51dcfb79e 100644 --- a/lib/backup/files.rb +++ b/lib/backup/files.rb @@ -37,7 +37,7 @@ module Backup unless status == 0 puts output - raise Backup::Error, 'Backup failed' + raise_custom_error end tar_cmd = [tar, exclude_dirs(:tar), %W[-C #{@backup_files_dir} -cf - .]].flatten @@ -49,7 +49,7 @@ module Backup end unless pipeline_succeeded?(tar_status: status_list[0], gzip_status: status_list[1], output: output) - raise Backup::Error, "Backup operation failed: #{output}" + raise_custom_error end end @@ -143,5 +143,9 @@ module Backup end end end + + def raise_custom_error + raise FileBackupError.new(app_files_dir, backup_tarball) + end end end |