summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-04-02 21:29:40 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-04-02 22:31:49 +0200
commite9b840529c7dab8322bcdd35410af7c7c4e0caf7 (patch)
tree66b5a727c639885a8687f9f145ed07bb973c0a98
parent05be2a00cefdc7dc9653080fa7df149910d5cd55 (diff)
downloadApp-BorgRestore-e9b840529c7dab8322bcdd35410af7c7c4e0caf7.tar.gz
App-BorgRestore-e9b840529c7dab8322bcdd35410af7c7c4e0caf7.tar.xz
Use Carp in select_archive_timespec
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-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 cde587b..ee82d01 100644
--- a/lib/App/BorgRestore.pm
+++ b/lib/App/BorgRestore.pm
@@ -173,8 +173,8 @@ sub select_archive_timespec {
my $seconds = $self->_timespec_to_seconds($timespec);
if (!defined($seconds)) {
- $log->error("Invalid time specification");
- return;
+ $log->errorf("Invalid time specification: %s", $timespec);
+ croak "Invalid time specification";
}
my $target_timestamp = time - $seconds;