summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-04-02 13:54:27 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-04-02 13:54:27 +0200
commitab037ebb9332f30d806b2c2ed2ffff55c1874709 (patch)
tree5f5e936b9d0e3c9bb1015a78da262bdb4879253a /lib
parent1c654d9c6494dcd929efdc6f8203a32c7860dfc2 (diff)
downloadApp-BorgRestore-ab037ebb9332f30d806b2c2ed2ffff55c1874709.tar.gz
App-BorgRestore-ab037ebb9332f30d806b2c2ed2ffff55c1874709.tar.xz
Use Carp for path resolving error
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib')
-rw-r--r--lib/App/BorgRestore.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/App/BorgRestore.pm b/lib/App/BorgRestore.pm
index 4891ec9..0c61312 100644
--- a/lib/App/BorgRestore.pm
+++ b/lib/App/BorgRestore.pm
@@ -11,6 +11,7 @@ use App::BorgRestore::Helper;
use App::BorgRestore::Settings;
use autodie;
+use Carp;
use Cwd qw(abs_path getcwd);
use File::Basename;
use File::Slurp;
@@ -114,7 +115,7 @@ sub resolve_relative_path {
if (!defined($abs_path)) {
$log->fatalf("Failed to resolve path to absolute path: %s: %s", $canon_path, $!);
$log->fatal("Make sure that all parts of the path, except the last one, exist.");
- return;
+ croak "Path resolving failed";
}
return $abs_path;