package com.crm.rely.backend.exception;

import lombok.Data;

@Data
public class PayValidatedException extends Exception {
    private int code;

    public PayValidatedException(String msg) {
        super(msg);
    }

    public PayValidatedException(int code, String msg) {
        super(msg);
        this.code = code;
    }

    public static PayValidatedException exception(String msg) {
        return new PayValidatedException(msg);
    }

    public static PayValidatedException exception(int code, String msg) {
        return new PayValidatedException(code, msg);
    }

    public static ServiceException exception(String msg, Object... args) {
        return new ServiceException(msg, args);
    }

    public static ServiceException exception(int code, String msg, Object... args) {
        return new ServiceException(code, msg, args);
    }
}
