public class BatchUpdateErrorInfo
extends Object
记录批量更新操作中某个批次的执行错误信息。
当批量更新过程中某个批次执行失败时,该类用于封装出错批次的索引、
异常原因及其错误类型,便于调用方进行针对性的错误处理。
- Author:
- ZhouXY
- See Also:
-
-
Constructor Summary
Constructors
-
Method Summary
int
返回该错误信息的字符串表示,包含批次索引、错误类型和错误消息。
-
Constructor Details
-
BatchUpdateErrorInfo
public BatchUpdateErrorInfo(int batchIndex,
Throwable cause)
构造一个批量更新错误信息实例。
- Parameters:
batchIndex - 出错的批次索引
cause - 导致该批次执行失败的异常
-
Method Details
-
getBatchIndex
public int getBatchIndex()
获取批次索引
- Returns:
- 批次索引
-
getCause
获取错误原因
- Returns:
- 错误原因
-
getErrorType
获取错误类型
- Returns:
- 错误类型
-
toString
返回该错误信息的字符串表示,包含批次索引、错误类型和错误消息。
- Overrides:
toString in class Object
- Returns:
- 格式为
"BatchUpdateErrorInfo{batchIndex=..., errorType=..., message=...}" 的字符串