package com.kingdee.eas.custom.integration.base.exception;

/**
 * ¼¯³ÉÒì³£
 */
public class IntegrationException extends RuntimeException {

    private final ErrorCode errorCode;

    public IntegrationException(ErrorCode errorCode) {
        this(errorCode, errorCode.getDefaultMessage(), null);
    }

    public IntegrationException(ErrorCode errorCode, String customMessage) {
        this(errorCode, customMessage, null);
    }

    public IntegrationException(ErrorCode errorCode, String customMessage, Throwable cause) {
        super(customMessage, cause);
        this.errorCode = errorCode;
    }

    public ErrorCode getErrorCode() {
        return errorCode;
    }
}