知识卡片
异常处理负责掩蔽或修复
检测异常后应根据来源和原因决定恢复或屏蔽方式,而非默认整个系统崩溃。错误码、异常对象等机制应携带有助定位的信息,使调用层能选择合理响应。该职责与检测不同:一个异常被捕获并吞掉,不代表系统已恢复到符合规格的状态。
相关:[[异常检测须覆盖不同信号]]。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
- · 第04章 可用性
原书出处 · 1 处
- 可用性 · 查看原书依据
The mechanism employed for exception handling depends largely on the programming environment employed, ranging from simple function return codes (error codes) to the use of exception classes that contain information helpful in fault correlation, such as the name of the exception, the origin of the exception, and the cause of the exception Software can then use this information to mask or repair the fault.
参考来源
- 位置:《Software Architecture in Practice, 4th Edition》第4章《可用性》(来源项目:book-sources;源文件:extracted/Software Architecture in Practice, 4th Edition/_epub-src/ch04.html)
- 结论依据:原文的定义、机制或比较支持“检测异常后应根据来源和原因决定恢复或屏蔽方式,而非默认整个系统崩溃”;正文保留其条件与取舍。
- 原始内容:The mechanism employed for exception handling depends largely on the programming environment employed, ranging from simple function return codes (error codes) to the use of exception classes that contain information helpful in fault correlation, such as the name of the exception, the origin of the exception, and the cause of the exception Software can then use this information to mask or repair the fault.