You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
779 B

package com.example.datacollect.exception;
public enum ErrorCode {
UNKNOWN_COMMAND("CMD001", "未知命令"),
INVALID_URL("URL001", "无效的URL"),
STRATEGY_NOT_FOUND("STR001", "未找到匹配的解析策略"),
NETWORK_ERROR("NET001", "网络请求失败"),
PARSE_ERROR("PRS001", "网页解析失败"),
FILE_IO_ERROR("FIO001", "文件读写错误"),
INVALID_ARGUMENT("ARG001", "参数无效"),
DATA_ACCESS_ERROR("DTA001", "数据访问错误");
private final String code;
private final String message;
ErrorCode(String code, String message) {
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
public String getMessage() {
return message;
}
}