Class SmsSendException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cloud.opencode.base.sms.exception.SmsException
cloud.opencode.base.sms.exception.SmsSendException
- All Implemented Interfaces:
Serializable
SMS Send Exception
短信发送异常
Exception thrown when SMS sending fails.
短信发送失败时抛出的异常。
Features | 主要功能:
- Phone number and provider code tracking - 手机号和服务商错误码跟踪
- Factory methods for common send failures - 常见发送失败的工厂方法
Usage Examples | 使用示例:
throw SmsSendException.failed("13800138000", cause);
throw SmsSendException.timeout("13800138000");
Security | 安全性:
- Thread-safe: Yes (immutable after construction) - 线程安全: 是(构造后不可变)
- Since:
- JDK 25, opencode-base-sms V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSmsSendException(SmsErrorCode errorCode, String phoneNumber) SmsSendException(SmsErrorCode errorCode, String phoneNumber, String providerCode) SmsSendException(SmsErrorCode errorCode, String phoneNumber, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionstatic SmsSendExceptionstatic SmsSendExceptionrateLimited(String phoneNumber) static SmsSendExceptionMethods inherited from class SmsException
getCode, getErrorCodeMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SmsSendException
-
SmsSendException
-
SmsSendException
-
-
Method Details
-
getPhoneNumber
-
getProviderCode
-
failed
-
timeout
-
rateLimited
-