📄 resexception.java
字号:
package com.hongsoft.res.pojo;
public class ResException extends Exception {
private static final long serialVersionUID = 4625019676648206307L;
private int errorCode = 0;
/**
* 其他数据库操作错误
*/
public static final int OTHER_DATABASE_ERROR = 1;
/**
* 用户登录名唯一性错误
*/
public static final int USER_LOGIN_NAME_UNIQUE_ERROR = 101;
/**
* 同一层角色名唯一性错误
*/
public static final int ROLE_NAME_UNIQUE_ERROR = 201;
/**
* 同一层组织名唯一性错误
*/
public static final int OU_NAME_UNIQUE_ERROR = 301;
/**
* 组织的父对象不是组织错误
*/
public static final int OU_PARENTID_ISNOT_OU_ERROR = 302;
/**
* 资源对象没有找到的错误
*/
public static final int RES_NOT_FOUND_ERROR = 401;
// 组织下面有组织,不能删除
public static final int THERE_IS_CHILD_ORG = 501;
public ResException(int errorCode) {
this.errorCode = errorCode;
}
public ResException(int errorCode, Throwable e) {
// super(e);
this.errorCode = errorCode;
}
public int getErrorCode() {
return errorCode;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -