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.

你可能感兴趣的:(Item 58: Used checked exceptions for recoverable conditions and runtime exceptions for programming errors)