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

来源:互联网 发布:淘宝网有多少服务器 编辑:程序博客网 时间:2024/05/18 02:02

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.

原创粉丝点击