package com.seer.teach.common.exception;

import com.seer.teach.common.enums.ResultCodeEnum;
import lombok.Getter;

@Getter
public class CommonException extends RuntimeException{

    private final ResultCodeEnum resultCode;

    public CommonException(ResultCodeEnum resultCode) {
        super(resultCode.getMsg());
        this.resultCode = resultCode;
    }

    public CommonException(ResultCodeEnum resultCode, String message) {
        super(message);
        this.resultCode = resultCode;
    }
}
