From fe3bc18d25d204c799d42610078509f11954e1c2 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 12 Nov 2017 01:10:29 +0100 Subject: Log borg errors instead of only throwing exception Signed-off-by: Florian Pritz --- lib/App/BorgRestore/Borg.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/App/BorgRestore/Borg.pm b/lib/App/BorgRestore/Borg.pm index 4dc1055..89a0b3a 100644 --- a/lib/App/BorgRestore/Borg.pm +++ b/lib/App/BorgRestore/Borg.pm @@ -35,7 +35,7 @@ method borg_list() { my @archives; $log->debug("Getting archive list"); - run [qw(borg list), $self->{borg_repo}], '>', \my $output or die "borg list returned $?"; + run [qw(borg list), $self->{borg_repo}], '>', \my $output or die $log->error("borg list returned $?")."\n"; for (split/^/, $output) { if (m/^([^\s]+)\s/) { @@ -50,7 +50,7 @@ method borg_list_time() { my @archives; $log->debug("Getting archive list"); - run [qw(borg list), $self->{borg_repo}], '>', \my $output or die "borg list returned $?"; + run [qw(borg list), $self->{borg_repo}], '>', \my $output or die $log->error("borg list returned $?")."\n"; for (split/^/, $output) { if (m/^([^\s]+)\s+(.+)$/) { -- cgit v1.2.3-24-g4f1b