Skip to content

Commit

Permalink
better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ardabeyazoglu committed Feb 6, 2024
1 parent a37d558 commit 9e095a6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Retention.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,10 @@ public function apply(string $baseDir)
}

if (empty($keepList)) {
$this->logger->error('There must be at least one file to keep.', [
$this->logger->notice('There must be at least one file to keep.', [
'baseDir' => $baseDir,
]);

throw new RetentionException('There must be at least one file to keep.');
return $keepList;
}

if ($this->dryRun) {
Expand Down

0 comments on commit 9e095a6

Please sign in to comment.