类 TTSException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.agentscope.core.model.tts.TTSException
- 所有已实现的接口:
Serializable
Exception thrown when TTS operations fail.
This exception encapsulates errors that occur during text-to-speech synthesis, including API errors, network issues, and invalid configurations.
- 另请参阅:
-
构造器概要
构造器构造器说明TTSException(String message) Creates a new TTSException with a message.TTSException(String message, int statusCode, String responseBody) Creates a new TTSException with HTTP status code.TTSException(String message, String errorCode, String responseBody) Creates a new TTSException with error code.TTSException(String message, Throwable cause) Creates a new TTSException with a message and cause. -
方法概要
修饰符和类型方法说明Gets the error code from the TTS provider.Gets the raw response body.Gets the HTTP status code.
-
构造器详细资料
-
TTSException
Creates a new TTSException with a message.- 参数:
message- error message
-
TTSException
Creates a new TTSException with a message and cause.- 参数:
message- error messagecause- the underlying cause
-
TTSException
Creates a new TTSException with HTTP status code.- 参数:
message- error messagestatusCode- HTTP status coderesponseBody- raw response body
-
TTSException
Creates a new TTSException with error code.- 参数:
message- error messageerrorCode- error code from providerresponseBody- raw response body
-
-
方法详细资料
-
getStatusCode
Gets the HTTP status code.- 返回:
- status code, or null if not applicable
-
getErrorCode
Gets the error code from the TTS provider.- 返回:
- error code, or null if not available
-
getResponseBody
Gets the raw response body.- 返回:
- response body for debugging
-