Correios CEP v0.3.0 Correios.CEP.Error exception View Source

Error structure.

Link to this section Summary

Functions

Returns the reason message of the exception

Create a new Correios.CEP.Error exception

Link to this section Types

Link to this type t() View Source
t() :: %Correios.CEP.Error{__exception__: term(), reason: String.t()}

Link to this section Functions

Returns the reason message of the exception.

Examples

iex> Correios.CEP.Error.message(%Correios.CEP.Error{reason: "Catastrofic error!"})
"Catastrofic error!"

Create a new Correios.CEP.Error exception.

Examples

iex> Correios.CEP.Error.new("Catastrofic error!")
%Correios.CEP.Error{reason: "Catastrofic error!"}

iex> Correios.CEP.Error.new(:someerror)
%Correios.CEP.Error{reason: "someerror"}