package com.ycwl.basic.image.pipeline.exception;

import com.ycwl.basic.pipeline.exception.PipelineException;

/**
 * Stage执行异常
 */
public class StageExecutionException extends PipelineException {

    private final String stageName;

    public StageExecutionException(String stageName, String message) {
        super(String.format("Stage '%s' 执行失败: %s", stageName, message));
        this.stageName = stageName;
    }

    public StageExecutionException(String stageName, String message, Throwable cause) {
        super(String.format("Stage '%s' 执行失败: %s", stageName, message), cause);
        this.stageName = stageName;
    }

    public String getStageName() {
        return stageName;
    }
}
