Exceptions
Every @api type across all five packages that implements Throwable.
| Exception | Package | Extends | Summary |
|---|---|---|---|
AmbiguousDefaultFactory | core | LogicException | Two registered default factories are equally close to the requested type. |
BypassUnavailable | core | LogicException | bypassFinals() cannot do what was asked of it. |
CannotWire | core | InvalidArgumentException | wire() cannot build the subject, or cannot decide what to pass it. |
ConflictingExpectation | core | LogicException | A when() or expect() names a call another registration already specifies, and the two would… |
ContextOwnershipViolation | core | LogicException | Configuration and verification belong to the context that created a double. |
ForgottenDouble | core | LogicException | A double outlived the context that created it — almost always a double kept in a static property… |
ForwardingTargetMismatch | core | InvalidArgumentException | The instance offered as a forwarding target does not satisfy what the double stands in for. |
InvalidCallSpecification | core | LogicException | The closure handed to when()/verify()/calls() did not describe one call the way a specification… |
InvalidDefaultValue | core | RuntimeException | A registered default factory produced a value the contract cannot hold. |
MatcherLeaked | core | LogicException | A matcher reached a real call instead of a specification closure. |
NeverMethodCalled | core | RuntimeException | A method declared : never was called without an expectation that throws. |
NoDefaultValue | core | RuntimeException | A loose understudy had to answer a call, but the declared return type has no safe default. |
NothingCaptured | core | LogicException | Captor::last() was read before any matched call carried a value through its capture() argument. |
OriginalCallUnavailable | core | LogicException | callOriginal() was asked to delegate, and there is nothing to delegate to. |
OriginalReturnTypeViolation | core | RuntimeException | A forwarded call returned an object the double cannot stand in for. |
OutcomeUnavailable | core | LogicException | An invocation's outcome was read as the wrong kind: a returned value asked of a call that threw. |
StrictModeViolation | core | RuntimeException | A strict understudy received a call no expectation matched. |
UnderstudyError | core | — | Implemented by every exception this library throws, so a test can catch misuse of Understudy… |
UnsupportedTarget | core | LogicException | The requested target cannot be doubled, and no option would make it work without the user changing… |
VerificationFailed | core | RuntimeException | A verification about what the code under test did (or did not) do failed. |