summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-11-12 01:10:29 +0100
committerFlorian Pritz <bluewind@xinu.at>2017-11-21 17:18:32 +0100
commitfe3bc18d25d204c799d42610078509f11954e1c2 (patch)
treee2c2880eb31576cf6002f3db751c611ba3b981a6 /lib
parent28688c3b7f872bd56939eb6da39ca038f9e4d3dd (diff)
downloadApp-BorgRestore-fe3bc18d25d204c799d42610078509f11954e1c2.tar.gz
App-BorgRestore-fe3bc18d25d204c799d42610078509f11954e1c2.tar.xz
Log borg errors instead of only throwing exception
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib')
-rw-r--r--lib/App/BorgRestore/Borg.pm4
1 files changed, 2 insertions, 2 deletions
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+(.+)$/) {