Msgpax v2.2.2 Msgpax.PackError exception View Source

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.

Link to this section Summary

Functions

Callback implementation for Exception.exception/1

Callback implementation for Exception.message/1

Link to this section Types

Link to this type t() View Source
t() :: %Msgpax.PackError{
  __exception__: term(),
  reason: {:too_big, any()} | {:not_encodable, any()}
}

Link to this section Functions

Callback implementation for Exception.exception/1.

Callback implementation for Exception.message/1.