类 TTSException

所有已实现的接口:
Serializable

public class TTSException extends RuntimeException
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

      public TTSException(String message)
      Creates a new TTSException with a message.
      参数:
      message - error message
    • TTSException

      public TTSException(String message, Throwable cause)
      Creates a new TTSException with a message and cause.
      参数:
      message - error message
      cause - the underlying cause
    • TTSException

      public TTSException(String message, int statusCode, String responseBody)
      Creates a new TTSException with HTTP status code.
      参数:
      message - error message
      statusCode - HTTP status code
      responseBody - raw response body
    • TTSException

      public TTSException(String message, String errorCode, String responseBody)
      Creates a new TTSException with error code.
      参数:
      message - error message
      errorCode - error code from provider
      responseBody - raw response body
  • 方法详细资料

    • getStatusCode

      public Integer getStatusCode()
      Gets the HTTP status code.
      返回:
      status code, or null if not applicable
    • getErrorCode

      public String getErrorCode()
      Gets the error code from the TTS provider.
      返回:
      error code, or null if not available
    • getResponseBody

      public String getResponseBody()
      Gets the raw response body.
      返回:
      response body for debugging