cloudroam
2025-03-19 c3fbe657671ae55768ce9ac7ea7bb75ff0c6829e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.jsh.erp.exception;
 
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
 
import java.util.HashMap;
import java.util.Map;
 
@Slf4j
@Getter
public class BusinessParamCheckingException extends Exception {
 
    private static final long serialVersionUID = 1L;
    private int code;
    private Map<String, Object> data;
 
    public BusinessParamCheckingException(int code, String reason) {
        super(reason);
        Map<String, Object> objectMap = new HashMap<>();
        objectMap.put("message", reason);
        this.code = code;
        this.data = objectMap;
    }
 
    public BusinessParamCheckingException(int code, String reason, Throwable throwable) {
        super(reason, throwable);
        Map<String, Object> objectMap = new HashMap<>();
        objectMap.put("message", reason);
        this.code = code;
        this.data = objectMap;
    }
}