Enum Class SmsErrorCode
- All Implemented Interfaces:
Serializable, Comparable<SmsErrorCode>, Constable
SMS Error Code
短信错误码
Error codes for SMS operations.
短信操作的错误码。
Features | 主要功能:
- Categorized error codes (send, phone, template, provider, content) - 分类错误码
- Numeric code and message per error - 每个错误包含数字码和消息
Usage Examples | 使用示例:
SmsErrorCode code = SmsErrorCode.SEND_FAILED;
int numCode = code.getCode(); // 1001
String msg = code.getMessage(); // "Failed to send SMS"
Security | 安全性:
- Thread-safe: Yes (enum is immutable) - 线程安全: 是(枚举不可变)
- Since:
- JDK 25, opencode-base-sms V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()static SmsErrorCodeReturns the enum constant of this class with the specified name.static SmsErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SEND_FAILED
-
SEND_TIMEOUT
-
SEND_RATE_LIMITED
-
NETWORK_ERROR
-
CONNECTION_TIMEOUT
-
READ_TIMEOUT
-
INVALID_PHONE_NUMBER
-
PHONE_NUMBER_BLOCKED
-
UNSUPPORTED_COUNTRY
-
TEMPLATE_NOT_FOUND
-
TEMPLATE_INVALID
-
TEMPLATE_VARIABLE_MISSING
-
PROVIDER_NOT_CONFIGURED
-
PROVIDER_ERROR
-
PROVIDER_UNAVAILABLE
-
MESSAGE_TOO_LONG
-
MESSAGE_EMPTY
-
INVALID_ENCODING
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public int getCode() -
getMessage
-