zepengdev
2025-06-26 97a55d2e9a7e6ee36d95e08731dd374f5fd93fa1
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
package com.oying.exception;
 
import lombok.Getter;
import org.springframework.http.HttpStatus;
import static org.springframework.http.HttpStatus.BAD_REQUEST;
 
/**
 * @author Z
 * @date 2018-11-23
 * 统一异常处理
 */
@Getter
public class BadRequestException extends RuntimeException{
 
    private Integer status = BAD_REQUEST.value();
 
    public BadRequestException(String msg){
        super(msg);
    }
 
    public BadRequestException(HttpStatus status,String msg){
        super(msg);
        this.status = status.value();
    }
}