提交 | 用户 | 时间
|
1ac2bc
|
1 |
package cn.stylefeng.guns.base.db.exception; |
懒 |
2 |
|
|
3 |
import cn.stylefeng.roses.kernel.model.exception.AbstractBaseExceptionEnum; |
|
4 |
import cn.stylefeng.roses.kernel.model.exception.ServiceException; |
|
5 |
|
|
6 |
/** |
|
7 |
* 数据源容器初始化失败异常 |
|
8 |
* |
|
9 |
* @author fengshuonan |
|
10 |
* @date 2019-06-12-13:53 |
|
11 |
*/ |
|
12 |
public class DataSourceInitException extends ServiceException { |
|
13 |
|
|
14 |
public DataSourceInitException(AbstractBaseExceptionEnum exception) { |
|
15 |
super(exception); |
|
16 |
} |
|
17 |
|
|
18 |
public enum ExEnum implements AbstractBaseExceptionEnum { |
|
19 |
|
|
20 |
DATA_SOURCE_READ_ERROR(500, "获取主数据源异常"), |
|
21 |
INIT_DATA_SOURCE_ERROR(500, "初始化数据源异常"), |
|
22 |
DELETE_TENANT_ERROR(500, "不能删除租户数据源"), |
|
23 |
REPEAT_ERROR(500, "数据源已存在,请更换名称!"), |
|
24 |
INIT_DATASOURCE_ERROR(500, "数据源连接错误,请检查连接配置!"), |
|
25 |
NAME_REPEAT_ERROR(500, "当前上下文中已存在该名称,请重启项目或更换名称!"), |
|
26 |
QUERY_DATASOURCE_INFO_ERROR(500, "查询数据库中数据源信息错误"); |
|
27 |
|
|
28 |
ExEnum(int code, String message) { |
|
29 |
this.code = code; |
|
30 |
this.message = message; |
|
31 |
} |
|
32 |
|
|
33 |
private Integer code; |
|
34 |
|
|
35 |
private String message; |
|
36 |
|
|
37 |
@Override |
|
38 |
public Integer getCode() { |
|
39 |
return code; |
|
40 |
} |
|
41 |
|
|
42 |
@Override |
|
43 |
public String getMessage() { |
|
44 |
return message; |
|
45 |
} |
|
46 |
|
|
47 |
} |
|
48 |
|
|
49 |
} |