package com.tzld.piaoquan.growth.common.common.exception;


import com.tzld.piaoquan.growth.common.common.enums.ExceptionCodeEnum;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class CustomizeException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private ExceptionCodeEnum exceptionCodeEnum;

    public CustomizeException(ExceptionCodeEnum exceptionCodeEnum) {
        super(exceptionCodeEnum.getMsg());
        this.exceptionCodeEnum = exceptionCodeEnum;
    }

    public CustomizeException(ExceptionCodeEnum exceptionCodeEnum, String msg) {
        super(msg);
        this.exceptionCodeEnum = exceptionCodeEnum;
    }
}