Correios CEP v0.6.0 Correios.CEP.Error exception View Source
Error structure.
Link to this section Summary
Link to this section Types
Specs
Link to this section Functions
Returns the reason message of the exception.
Examples
iex> error = %Correios.CEP.Error{reason: "Catastrophic error!"}
...> Correios.CEP.Error.message(error)
"Catastrophic error!"
Specs
Creates a new Correios.CEP.Error
exception.
Examples
iex> Correios.CEP.Error.new("Catastrophic error!")
%Correios.CEP.Error{reason: "Catastrophic error!"}
iex> Correios.CEP.Error.new('Catastrophic error!')
%Correios.CEP.Error{reason: "Catastrophic error!"}
iex> Correios.CEP.Error.new(:some_error)
%Correios.CEP.Error{reason: "some_error"}
iex> Correios.CEP.Error.new(%{a: 123})
%Correios.CEP.Error{reason: "%{a: 123}"}