Wed Jun 25 01:59:02 GMT 2008 problem of using exception for control flowOther than harder to read, this approach is easier to have side effect, consider the following case:
The idea is, for any database problem, just return default value. However, if someone change the interface of NotFoundException to public final class NotFoundException extends RuntimeException {....} Then it break service() silencely :-/ Some to it is better to have
(google search) (amazon search) second |