Enum Class FeatureErrorCode
- All Implemented Interfaces:
Serializable, Comparable<FeatureErrorCode>, Constable
Feature Error Code
功能错误码
Error codes for feature-related exceptions.
功能相关异常的错误码。
Code Ranges | 错误码范围:
- 0 - Unknown errors | 未知错误
- 1xxx - Feature errors | 功能错误
- 2xxx - Configuration errors | 配置错误
- 3xxx - Store errors | 存储错误
- 4xxx - Security errors | 安全错误
Features | 主要功能:
- Categorized error codes: general, storage, strategy, security - 分类错误代码:通用、存储、策略、安全
- Bilingual error messages (English and Chinese) - 双语错误消息
Usage Examples | 使用示例:
FeatureErrorCode value = FeatureErrorCode.values()[0];
// Use in switch or comparisons
// 在switch或比较中使用
Security | 安全性:
- Thread-safe: Yes (immutable) - 线程安全: 是(不可变)
- Null-safe: N/A - 空值安全: 不适用
- Since:
- JDK 25, opencode-base-feature V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()Get error code 获取错误码Get description (code: message) 获取描述 (code: message)Get error message 获取错误消息Get Chinese error message 获取中文错误消息static FeatureErrorCodeReturns the enum constant of this class with the specified name.static FeatureErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
-
NOT_FOUND
-
ALREADY_EXISTS
-
INVALID_KEY
-
EXPIRED
-
GROUP_NOT_FOUND
-
INVALID_STRATEGY
-
INVALID_CONTEXT
-
INVALID_CONFIG
-
STORE_ERROR
-
PERSIST_FAILED
-
LOAD_FAILED
-
UNAUTHORIZED
-
AUDIT_FAILED
-
SECURITY_VIOLATION
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public int getCode()Get error code 获取错误码- Returns:
- error code | 错误码
-
getMessage
-
getMessageZh
-
getDescription
Get description (code: message) 获取描述 (code: message)- Returns:
- description | 描述
-