View Source SMPPEX.Pdu.Errors (smppex v3.2.1)

Module for operating with SMPP errors.

Link to this section Summary

Functions

Converts atom representing SMPP error to its integer value.

Converts integer SMPP error code to text error description.

Converts integer SMPP error code to string error identifier.

Link to this section Types

@type error_code() :: integer()
@type error_name() :: atom()

Link to this section Functions

@spec code_by_name(error_name()) :: error_code()

Converts atom representing SMPP error to its integer value.

example

Example:

iex(1)> SMPPEX.Pdu.Errors.code_by_name(:ROK)
0
@spec description(error_code()) :: String.t()

Converts integer SMPP error code to text error description.

example

Example

iex(1)> SMPPEX.Pdu.Errors.description(0)
"No Error"
iex(2)> SMPPEX.Pdu.Errors.description(12345)
"12345"
@spec format(error_code()) :: String.t()

Converts integer SMPP error code to string error identifier.

example

Example

iex(1)> SMPPEX.Pdu.Errors.format(0)
"ROK"
iex(2)> SMPPEX.Pdu.Errors.format(12345)
"12345"