GaveUpException
Rasuvaeff\PropertyTesting\GaveUpException
Class — Package: property-testing-core — Source — Version: v0.1.0-12-g86ead85
Extends: RuntimeException
Implements: Stringable, Throwable
Thrown (as the failure of a property) when discarded inputs exceed the configured budget before the requested number of successful checks completes.
It exposes successful, discarded and total attempt counts so the result cannot hide a weak input distribution.
The fix is almost always to construct valid inputs directly (e.g. Gen::flatMap() / Gen::draw()) rather than generating broadly and discarding, so runs are valid by construction.
Constructor
php
__construct(
string $propertyName,
int $requiredRuns,
int $successfulRuns,
int $discardedRuns,
int $attempts,
int $maxDiscards,
)| Parameter | Type | Default | Description |
|---|---|---|---|
$propertyName | string | required | |
$requiredRuns | int | required | |
$successfulRuns | int | required | |
$discardedRuns | int | required | |
$attempts | int | required | |
$maxDiscards | int | required |