summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-04-02 15:07:58 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-04-02 22:31:49 +0200
commit6566bdbfe375065bed11d9a459c438cbc405243d (patch)
tree32df0ba5aa1baee61030b9da894a298a6c9f193b /lib
parent6e83ac2364202c5254d5c99b50b7a4cd2cec868c (diff)
downloadApp-BorgRestore-6566bdbfe375065bed11d9a459c438cbc405243d.tar.gz
App-BorgRestore-6566bdbfe375065bed11d9a459c438cbc405243d.tar.xz
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 <bluewind@xinu.at>
Diffstat (limited to 'lib')
-rw-r--r--lib/App/BorgRestore.pm4
1 files changed, 2 insertions, 2 deletions
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;