Skip to content

Commit

Permalink
fix swallowed exceptions in properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Jan 28, 2024
1 parent 694c5fd commit e3477f0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog

## [Unreleased]

### Fixed

- Thrown exceptions in properties weren't failing proofs

## 5.6.1 - 2023-12-02

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/Runner/Proof/Scenario/Properties.php
Expand Up @@ -33,7 +33,7 @@ public function __invoke(Assert $assert): mixed
} catch (Assert\Failure $e) {
throw $e;
} catch (\Throwable $e) {
$assert->not()->throws(static fn() => $e);
$assert->not()->throws(static fn() => throw $e);
}

return null;
Expand Down
2 changes: 1 addition & 1 deletion src/Runner/Proof/Scenario/Property.php
Expand Up @@ -33,7 +33,7 @@ public function __invoke(Assert $assert): mixed
} catch (Assert\Failure $e) {
throw $e;
} catch (\Throwable $e) {
$assert->not()->throws(static fn() => $e);
$assert->not()->throws(static fn() => throw $e);
}

return null;
Expand Down

0 comments on commit e3477f0

Please sign in to comment.