Skip to content

Commit 7bed756

Browse files
committed
Invalid argument for invalid value
1 parent 43aaba7 commit 7bed756

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Database/Database.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5149,7 +5149,7 @@ public function increaseDocumentAttribute(
51495149
int|float|null $max = null
51505150
): Document {
51515151
if ($value <= 0) { // Can be a float
5152-
throw new DatabaseException('Value must be numeric and greater than 0');
5152+
throw new \InvalidArgumentException('Value must be numeric and greater than 0');
51535153
}
51545154

51555155
$collection = $this->silent(fn () => $this->getCollection($collection));
@@ -5246,7 +5246,7 @@ public function decreaseDocumentAttribute(
52465246
int|float|null $min = null
52475247
): Document {
52485248
if ($value <= 0) { // Can be a float
5249-
throw new DatabaseException('Value must be numeric and greater than 0');
5249+
throw new \InvalidArgumentException('Value must be numeric and greater than 0');
52505250
}
52515251

52525252
$collection = $this->silent(fn () => $this->getCollection($collection));

0 commit comments

Comments
 (0)