GenerationExhausted
Rasuvaeff\PropertyTesting\GenerationExhausted
Class — Package: property-testing-core — Source — Version: v0.1.0-12-g86ead85
Extends: RuntimeException
Implements: Stringable, Throwable
Thrown when a bounded-attempt generator cannot produce a value that satisfies its constraint within its attempt budget: Arbitrary\FilteredArbitrary whose predicate rejected every draw, or a sized collection (Arbitrary\DictionaryArbitrary, Arbitrary\UniqueArrayArbitrary, Arbitrary\CommandSequenceArbitrary) that could not reach its declared minimum.
A generator NEVER yields a value outside its declared domain — it fails loudly with this exception instead, so a property never silently receives an out-of-domain input. Exhaustion can be transient (a satisfiable-but-rare predicate) or structural (a domain too small to ever meet the minimum); the message describes what happened and how to widen the domain.
Constructor
__construct(
string $arbitrary,
int $attempts,
string $reason,
)| Parameter | Type | Default | Description |
|---|---|---|---|
$arbitrary | string | required | Human-readable label of the generator that gave up (e.g. Gen::filter()). |
$attempts | int | required | Attempt budget spent before giving up. |
$reason | string | required | What could not be satisfied and how to fix it. |