mirror of
				https://github.com/continew-org/continew-starter.git
				synced 2025-11-04 18:59:22 +08:00 
			
		
		
		
	refactor(core): 完善自定义异常类构造方法
This commit is contained in:
		@@ -16,6 +16,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
package top.charles7c.continew.starter.core.exception;
 | 
					package top.charles7c.continew.starter.core.exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.Serial;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 自定义验证异常-错误请求
 | 
					 * 自定义验证异常-错误请求
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@@ -24,10 +26,21 @@ package top.charles7c.continew.starter.core.exception;
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
public class BadRequestException extends BaseException {
 | 
					public class BadRequestException extends BaseException {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Serial
 | 
				
			||||||
 | 
					    private static final long serialVersionUID = 1L;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public BadRequestException() {
 | 
					    public BadRequestException() {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public BadRequestException(String message) {
 | 
					    public BadRequestException(String message) {
 | 
				
			||||||
        super(message);
 | 
					        super(message);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public BadRequestException(Throwable cause) {
 | 
				
			||||||
 | 
					        super(cause);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public BadRequestException(String message, Throwable cause) {
 | 
				
			||||||
 | 
					        super(message, cause);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,6 +16,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
package top.charles7c.continew.starter.core.exception;
 | 
					package top.charles7c.continew.starter.core.exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.Serial;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 自定义异常基类
 | 
					 * 自定义异常基类
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@@ -24,10 +26,21 @@ package top.charles7c.continew.starter.core.exception;
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
public class BaseException extends RuntimeException {
 | 
					public class BaseException extends RuntimeException {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Serial
 | 
				
			||||||
 | 
					    private static final long serialVersionUID = 1L;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public BaseException() {
 | 
					    public BaseException() {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public BaseException(String message) {
 | 
					    public BaseException(String message) {
 | 
				
			||||||
        super(message);
 | 
					        super(message);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public BaseException(Throwable cause) {
 | 
				
			||||||
 | 
					        super(cause);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public BaseException(String message, Throwable cause) {
 | 
				
			||||||
 | 
					        super(message, cause);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,6 +16,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
package top.charles7c.continew.starter.core.exception;
 | 
					package top.charles7c.continew.starter.core.exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.Serial;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 业务异常
 | 
					 * 业务异常
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@@ -24,10 +26,21 @@ package top.charles7c.continew.starter.core.exception;
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
public class BusinessException extends BaseException {
 | 
					public class BusinessException extends BaseException {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Serial
 | 
				
			||||||
 | 
					    private static final long serialVersionUID = 1L;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public BusinessException() {
 | 
					    public BusinessException() {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public BusinessException(String message) {
 | 
					    public BusinessException(String message) {
 | 
				
			||||||
        super(message);
 | 
					        super(message);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public BusinessException(Throwable cause) {
 | 
				
			||||||
 | 
					        super(cause);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public BusinessException(String message, Throwable cause) {
 | 
				
			||||||
 | 
					        super(message, cause);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user