feat: 全局异常
This commit is contained in:
parent
8a7c017b1c
commit
afa6616732
|
@ -0,0 +1,18 @@
|
|||
package com.sky.common.exception;
|
||||
|
||||
/**
|
||||
* 账号被锁定异常
|
||||
*/
|
||||
public class AccountLockedException extends BaseException{
|
||||
/**
|
||||
* Constructs a new runtime exception with {@code null} as its
|
||||
* detail message. The cause is not initialized, and may subsequently be
|
||||
* initialized by a call to {@link #initCause}.
|
||||
*/
|
||||
public AccountLockedException() {
|
||||
}
|
||||
|
||||
public AccountLockedException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.sky.common.exception;
|
||||
|
||||
/**
|
||||
* 账号不存在异常
|
||||
*/
|
||||
public class AccountNotFoundException extends BaseException{
|
||||
/**
|
||||
* Constructs a new runtime exception with {@code null} as its
|
||||
* detail message. The cause is not initialized, and may subsequently be
|
||||
* initialized by a call to {@link #initCause}.
|
||||
*/
|
||||
public AccountNotFoundException() {
|
||||
}
|
||||
|
||||
public AccountNotFoundException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.sky.common.exception;
|
||||
|
||||
/**
|
||||
* 地址信息异常
|
||||
*/
|
||||
public class AddressBookBusinessException extends BaseException{
|
||||
/**
|
||||
* Constructs a new runtime exception with {@code null} as its
|
||||
* detail message. The cause is not initialized, and may subsequently be
|
||||
* initialized by a call to {@link #initCause}.
|
||||
*/
|
||||
public AddressBookBusinessException() {
|
||||
}
|
||||
|
||||
public AddressBookBusinessException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.sky.common.exception;
|
||||
|
||||
/**
|
||||
* 业务异常
|
||||
*/
|
||||
public class BaseException extends RuntimeException{
|
||||
/**
|
||||
* Constructs a new runtime exception with {@code null} as its
|
||||
* detail message. The cause is not initialized, and may subsequently be
|
||||
* initialized by a call to {@link #initCause}.
|
||||
*/
|
||||
public BaseException() {
|
||||
}
|
||||
public BaseException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.sky.common.exception;
|
||||
|
||||
/**
|
||||
* 不允许删除异常
|
||||
*/
|
||||
public class DeletionNotAllowedException extends BaseException{
|
||||
/**
|
||||
* Constructs a new runtime exception with {@code null} as its
|
||||
* detail message. The cause is not initialized, and may subsequently be
|
||||
* initialized by a call to {@link #initCause}.
|
||||
*/
|
||||
public DeletionNotAllowedException() {
|
||||
}
|
||||
|
||||
public DeletionNotAllowedException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.sky.common.exception;
|
||||
|
||||
/**
|
||||
* 登录失败
|
||||
*/
|
||||
public class LoginFailedException extends BaseException{
|
||||
/**
|
||||
* Constructs a new runtime exception with {@code null} as its
|
||||
* detail message. The cause is not initialized, and may subsequently be
|
||||
* initialized by a call to {@link #initCause}.
|
||||
*/
|
||||
public LoginFailedException() {
|
||||
}
|
||||
|
||||
public LoginFailedException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.sky.common.exception;
|
||||
|
||||
/**
|
||||
* 订单业务异常
|
||||
*/
|
||||
public class OrderBusinessException extends BaseException{
|
||||
/**
|
||||
* Constructs a new runtime exception with {@code null} as its
|
||||
* detail message. The cause is not initialized, and may subsequently be
|
||||
* initialized by a call to {@link #initCause}.
|
||||
*/
|
||||
public OrderBusinessException() {
|
||||
}
|
||||
|
||||
public OrderBusinessException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.sky.common.exception;
|
||||
|
||||
/**
|
||||
* 密码修改失败异常
|
||||
*/
|
||||
public class PasswordEditFailedException extends BaseException{
|
||||
/**
|
||||
* Constructs a new runtime exception with {@code null} as its
|
||||
* detail message. The cause is not initialized, and may subsequently be
|
||||
* initialized by a call to {@link #initCause}.
|
||||
*/
|
||||
public PasswordEditFailedException() {
|
||||
}
|
||||
|
||||
public PasswordEditFailedException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.sky.common.exception;
|
||||
|
||||
/**
|
||||
* 密码错误异常
|
||||
*/
|
||||
public class PasswordErrorException extends BaseException{
|
||||
/**
|
||||
* Constructs a new runtime exception with {@code null} as its
|
||||
* detail message. The cause is not initialized, and may subsequently be
|
||||
* initialized by a call to {@link #initCause}.
|
||||
*/
|
||||
public PasswordErrorException() {
|
||||
}
|
||||
|
||||
public PasswordErrorException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.sky.common.exception;
|
||||
|
||||
/**
|
||||
* 套餐启用失败异常
|
||||
*/
|
||||
public class SetMealEnableFailedException extends BaseException{
|
||||
/**
|
||||
* Constructs a new runtime exception with {@code null} as its
|
||||
* detail message. The cause is not initialized, and may subsequently be
|
||||
* initialized by a call to {@link #initCause}.
|
||||
*/
|
||||
public SetMealEnableFailedException() {
|
||||
}
|
||||
|
||||
public SetMealEnableFailedException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.sky.common.exception;
|
||||
|
||||
/**
|
||||
* 购物车异常
|
||||
*/
|
||||
public class ShoppingCartBusinessException extends BaseException{
|
||||
/**
|
||||
* Constructs a new runtime exception with {@code null} as its
|
||||
* detail message. The cause is not initialized, and may subsequently be
|
||||
* initialized by a call to {@link #initCause}.
|
||||
*/
|
||||
public ShoppingCartBusinessException() {
|
||||
}
|
||||
|
||||
public ShoppingCartBusinessException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.sky.common.exception;
|
||||
|
||||
/**
|
||||
* 用户未登录异常
|
||||
*/
|
||||
public class UserNotLoginException extends BaseException {
|
||||
/**
|
||||
* Constructs a new runtime exception with {@code null} as its
|
||||
* detail message. The cause is not initialized, and may subsequently be
|
||||
* initialized by a call to {@link #initCause}.
|
||||
*/
|
||||
public UserNotLoginException() {
|
||||
}
|
||||
|
||||
public UserNotLoginException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue