From 6566bdbfe375065bed11d9a459c438cbc405243d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 2 Apr 2017 15:07:58 +0200 Subject: die on error instead of croak Croak would indicate that the caller is at fault, but if there is no path in the archive that's not a caller problem. Signed-off-by: Florian Pritz --- lib/App/BorgRestore.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/App/BorgRestore.pm b/lib/App/BorgRestore.pm index 9b68304..cde587b 100644 --- a/lib/App/BorgRestore.pm +++ b/lib/App/BorgRestore.pm @@ -115,7 +115,7 @@ sub resolve_relative_path { if (!defined($abs_path)) { $log->errorf("Failed to resolve path to absolute path: %s: %s", $canon_path, $!); $log->error("Make sure that all parts of the path, except the last one, exist."); - croak "Path resolving failed"; + die "Path resolving failed\n"; } return $abs_path; @@ -158,7 +158,7 @@ sub find_archives { if (!@ret) { $log->errorf("Path '%s' not found in any archive.\n", $path); - croak "Failed to find archives for path"; + die "Failed to find archives for path\n"; } @ret = sort { $a->{modification_time} <=> $b->{modification_time} } @ret; -- cgit v1.2.3-24-g4f1b