Item 12: Exception Safety: Is It Worth It?
条款12:异常安全:它值得吗?
The mapping is difficult to use and contains many pitfalls that lead to bugs, particularly with respect to thread safety, exception safety, and memory management.
映射不易使用,包含许多导致bug的缺陷,特别关于线程安全性、异常安全性和内存管理的部分。
A number of developers responded by noting that this kind of design problem is not unique to multi-threading and that there is a difference between "lock safety" and "exception safety."
这篇文章反响热烈,一些开发人员认为这类设计问题不只限于多线程,在“安全锁”和“安全异常”之间也存在不同之处。
That contract does not allow this method to throw a run-time exception (barring violations of generic type safety that qualify as bugs in the calling code).
这个合约不允许该方法抛出运行时异常(防止因违反泛型类型安全而成为调用代码中的bug)。
Each advice USES as little information about the join point as possible and discloses about itself only what's necessary for type-safety, exception-checking, and the like.
每个通知都使用最少的连接点信息,仅透漏类型安全、异常检查等必需的自身信息。
This combination of parameter Settings turns best-fit mapping off, but enables the exception-throwing mechanism as a safety precaution.
这种参数设置组合可以关闭最佳映射,但启用异常引发机制作为安全预防措施。
This combination of parameter Settings turns best-fit mapping off, but enables the exception-throwing mechanism as a safety precaution.
这种参数设置组合可以关闭最佳映射,但启用异常引发机制作为安全预防措施。
应用推荐