smppex v0.3.1 SMPPEX.Pdu.Errors

Module for operating with SMPP errors.

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

Types

error_code :: integer
error_name :: atom

Functions

code_by_name(name)

Specs

code_by_name(error_name) :: error_code

Converts atom representing SMPP error to its integer value.

Example:

iex(1)> SMPPEX.Pdu.Errors.code_by_name(:ROK)
0
description(error_code)

Specs

description(error_code) :: String.t

Converts integer SMPP error code to text error description.

Example

iex(1)> SMPPEX.Pdu.Errors.description(0)
"No Error"
iex(2)> SMPPEX.Pdu.Errors.description(12345)
"12345"
format(code)

Specs

format(error_code) :: String.t

Converts integer SMPP error code to string error identifier.

Example

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