Rupa.EncodeError exception (rupa v0.1.0)

Copy Markdown View Source

Raised by Rupa.encode!/3 when a value does not match the schema it is being encoded against.

Its own exception rather than a shared one, because the two failures mean different things: a decode error is the outside world being wrong, and an encode error is your own code being wrong about a value it built.

Summary

Types

t()

@type t() :: %Rupa.EncodeError{__exception__: term(), errors: [Rupa.Error.t()]}