Msgpax v2.0.0 Msgpax.PackError exception

Exception that represents an error in packing terms.

This exception has a :reason field that can have one of the following values:

  • {:not_encodable, term} - means that the given argument is not serializable. For example, this is returned when you try to pack bits instead of a binary (as only binaries can be serialized).

  • {:too_big, term} - means that the given term is too big to be encoded. What “too big” means depends on the term being encoded; for example, integers larger than 18_446_744_073_709_551_616 are too big to be encoded with MessagePack.

Summary

Functions

Callback implementation for Exception.exception/1

Callback implementation for Exception.message/1

Types

t()
t() :: %Msgpax.PackError{__exception__: term, reason: {:too_big, any} | {:not_encodable, any}}

Functions

exception(args)
exception(Keyword.t) :: Exception.t

Callback implementation for Exception.exception/1.

message(exception)

Callback implementation for Exception.message/1.