Misuse

sealed interface Misuse

A Wow API that cannot serve a call as the code made it: the code's own mistake, a wrong argument (a read of a state class no aggregate has, a command to a context no peer describes) or a wrong state of use (a command object to a peer that takes named commands alone, a peer the configuration gives no address), never the caller's, nor a peer's or the wire's, which are transport failures. It is a subclass of IllegalArgumentException or IllegalStateException, never the class itself, which a decide function's own require and check throw and the kernel answers as the command's rejection: a decide function that runs into a Misuse fails its command, as an unexpected exception does, and a subscription handler's is unrecoverable, since it fails the same way every time. The kernel's decide scope, the read API and the command clients throw it.

Inheritors

Types

Link copied to clipboard

An argument the API cannot serve: its require.

Link copied to clipboard

A call the API cannot serve in its state: its check.