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

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

    private final String stageName;

    public StageExecutionException(String stageName, String message) {
        super(String.format("[%s] %s", stageName, message));
        this.stageName = stageName;
    }

    public StageExecutionException(String stageName, String message, Throwable cause) {
        super(String.format("[%s] %s", stageName, message), cause);
        this.stageName = stageName;
    }

    public String getStageName() {
        return stageName;
    }
}
