View Source Msgpax.PackError exception (Msgpax v2.4.0)

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.message/1.

Link to this section Types

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

Link to this section Functions

Callback implementation for Exception.message/1.