package com.fs.aiSoundReplication.exception;

import lombok.Getter;

@Getter
public class VoiceCloneException extends RuntimeException {
    private final Integer errorCode;
    private final String errorMessage;

    public VoiceCloneException(Integer errorCode, String errorMessage) {
        super(String.format("错误码: %d, 错误信息: %s", errorCode, errorMessage));
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

    public VoiceCloneException(String message, Throwable cause) {
        super(message, cause);
        this.errorCode = -1;
        this.errorMessage = message;
    }
}
