Skip to content

OutcomeUnavailable ​

Rasuvaeff\Understudy\Exception\OutcomeUnavailable

Class — Package: rasuvaeff/understudy — Source — Version: v1.1.0-1-g6ed023f

Extends: LogicException

Implements: Throwable, Stringable, Exception\UnderstudyError

An invocation's outcome was read as the wrong kind: a returned value asked of a call that threw. null is a valid return value, so this cannot be signalled by returning null.

Methods ​

threwInstead() ​

php
static threwInstead(non-empty-string $method, Throwable $thrown): self

Builds the error for reading a return value after a throw.

discardedByLean() ​

php
static discardedByLean(non-empty-string $method): self

Builds the error for reading a value discarded by lean mode.