zhs
2025-04-22 ad5f737d5fa1265e956317bce7e6ed69a5973241
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
package com.ruoyi.common.exception;
 
public class HttpRequestException extends RuntimeException {
    private static final long serialVersionUID = 1158312384059617619L;
 
    private int code;
 
    public HttpRequestException() {
        super();
    }
 
    public HttpRequestException(int code, Throwable cause) {
        super(cause);
        this.code = code;
    }
 
    public HttpRequestException(int code, String message) {
        super(message);
        this.code = code;
    }
 
    public int getCode() {
        return code;
    }
 
    public String getMsg() {
        return super.getMessage();
    }
 
    @Override
    public String getMessage() {
        return "Error code is " + code + ", msg is " + super.getMessage();
    }
}