baoshiwei
2025-03-12 f1208474f771a1c233d7425c8ed13fbaa0d521ac
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package org.dromara.common.core.exception;
 
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
 
import java.io.Serial;
 
/**
 * sse 特制异常
 *
 * @author LionLi
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public final class SseException extends RuntimeException {
 
    @Serial
    private static final long serialVersionUID = 1L;
 
    /**
     * 错误码
     */
    private Integer code;
 
    /**
     * 错误提示
     */
    private String message;
 
    /**
     * 错误明细,内部调试错误
     */
    private String detailMessage;
 
    public SseException(String message) {
        this.message = message;
    }
 
    public SseException(String message, Integer code) {
        this.message = message;
        this.code = code;
    }
 
    @Override
    public String getMessage() {
        return message;
    }
 
    public SseException setMessage(String message) {
        this.message = message;
        return this;
    }
 
    public SseException setDetailMessage(String detailMessage) {
        this.detailMessage = detailMessage;
        return this;
    }
}