Higher layers should catch lower-level exceptions and, in their place, throw exceptions that can be explained in terms of the higher-level abstraction.
Item 61: Throw exceptions appropriate to the abstraction
最新推荐文章于 2022-05-17 21:38:06 发布
本文阐述了在编程实践中,如何让高层代码捕获并处理来自底层的异常,并通过抛出新的异常来提供更具体、易于理解的错误信息,从而提高代码的可读性和维护性。
1180

被折叠的 条评论
为什么被折叠?



