package com.friday.tooldriver.exception;


import com.friday.tooldriver.constants.DriverSystemCode;

public class DriverBusinessException extends Exception {

    private DriverSystemCode systemCode;

    public DriverBusinessException(DriverSystemCode systemCode, String message, Exception e) {
        super(systemCode.toString(message), e);
        this.systemCode = systemCode;
    }

    public DriverBusinessException(String message, Exception e) {
        super(DriverSystemCode.INTERNAL_ERROR.toString(message), e);
        this.systemCode = DriverSystemCode.INTERNAL_ERROR;
    }

    public DriverBusinessException(DriverSystemCode systemCode, Exception e) {
        super(systemCode.toString(), e);
        this.systemCode = systemCode;
    }

    public DriverBusinessException(DriverSystemCode systemCode, String message) {
        super(systemCode.toString(message));
        this.systemCode = systemCode;
    }

    public DriverBusinessException(String message) {
        super(DriverSystemCode.INTERNAL_ERROR.toString(message));
        this.systemCode = DriverSystemCode.INTERNAL_ERROR;
    }

    public DriverBusinessException(DriverSystemCode systemCode) {
        super(systemCode.toString());
        this.systemCode = systemCode;
    }

    public DriverSystemCode getDriverSystemCode() {
        return this.systemCode;
    }

    public void setDriverSystemCode(DriverSystemCode systemCode) {
        this.systemCode = systemCode;
    }
}
