From e9b840529c7dab8322bcdd35410af7c7c4e0caf7 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 2 Apr 2017 21:29:40 +0200 Subject: Use Carp in select_archive_timespec Signed-off-by: Florian Pritz --- lib/App/BorgRestore.pm | 4 ++-- 1 file 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; -- cgit v1.2.3-24-g4f1b