`
amanhu
  • 浏览: 12323 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

Item 58: Used checked exceptions for recoverable conditions and runtime exceptions for programming errors

 
阅读更多

1 use checked exceptions for conditions from which the caller can reasonably be expected to recover.

2 use runtime exceptions to indicate programming errors. The majority of runtime exceptions indicate precondition violations.

3.All of the unchecked throwable you implement should subclass RuntimeException.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics