The Effective Java Exceptions article describes a CheckingAccount
which should processCheck()
. Furthermore it states:
The natural way to represent the contingency responses in Java is to define two exceptions, say
StopPaymentException
andInsufficientFundsException
To me this sounds like exceptions used for flow control. Could you please explain why it is okay to use checked exceptions for flow control here? (Or whether this is no case of flow control.)