java中exception ee,java/BadException.java · 开源中国/bullshit-codes - Gitee.com

/**

* 处理业务的异常

* 居然有一堆静态异常,准备好了随时可以抛??

* 错误码是字符串

*/

public class CommandException extends BaseException {

private static final long serialVersionUID = -6354513454371927970L;

public static CommandException PARAM_NULL= new CommandException("Command_assemble_01", "Parameter is Needed But Empty");

public static CommandException DEVID_NULL = new CommandException("Command_assemble_02", "DevId Cannot Be Null");

public static CommandException MDCODE_NULL = new CommandException("Command_assemble_03", "Model Code Cannot Be Empty");

public static CommandException ORDER_NULL = new CommandException("Command_assemble_04", "Order Cannot Be Empty");

public static CommandException TYPE_NULL = new CommandException("Command_assemble_05", "Upstream / Downstream Type Cannot Be Empty");

public static CommandException MENUID_NULL = new CommandException("Command_assemble_06", "Menu Id Cannot Be Null");

public static CommandException CTRLTYPE_NOT_RANGE= new CommandException("Command_assemble_07", "Ctrltype Cannot Be Recognized, Which is not in Range");

public static CommandException CMD_NULL = new CommandException("Command_analyze_01", "CMD Cannot Be Null");

public static CommandException PAYLOAD_NULL = new CommandException("Command_analyze_02", "Payload Cannot Be Null");

public static CommandException FRAMEWORK_FAILED= new CommandException("Command_analyze_03", "Framework Failed to be Checked");

public static CommandException CHECK_FAILED= new CommandException("Command_analyze_04", "Command Failed to be Checked");

public static CommandException CONFIGURE_NOT_EXIST = new CommandException("Command_error_1001", "Configure is not Exist");

public static CommandException REDIS_ERROR = new CommandException("Command_error_1002", "Cache Command in Redis Error", true);

public CommandException() {

super();

}

public CommandException(String errCode, String errMsg, boolean isSystem, Throwable cause) {

super(errCode, errMsg, isSystem, cause);

}

public CommandException(String errCode, String errMsg) {

super(errCode, errMsg);

}

public CommandException(String errCode, String errMsg, boolean isSystem) {

super(errCode, errMsg, isSystem);

}

public CommandException(String errCode, String errMsg, Throwable cause) {

super(errCode, errMsg, cause);

}

一键复制

编辑

Web IDE

原始数据

按行查看

历史

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值