package cn.superdesk.uniorder.common.exception;

import lombok.Getter;
import org.springframework.http.HttpStatus;

import static org.springframework.http.HttpStatus.BAD_REQUEST;


/**
 * @Description: 统一异常处理
 * @Author: linjinyu
 * @CreateDate: 2020/12/23 上午11:00
 * @UpdateUser: linjinyu
 * @UpdateDate: 2020/12/23 上午11:00
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Getter
public class BadRequestException extends RuntimeException {

	private Integer code = BAD_REQUEST.value();

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

	public BadRequestException(HttpStatus status, String msg) {
		super(msg);
		this.code = status.value();
	}
}