On Fri, Nov 16, 2012 at 9:27 AM, tamouse mailing lists
<tamouse.lists / gmail.com> wrote:

> Is this a good way to use exceptions? Having an insufficent balance
> might be something the user finds exceptional, but I'd think it would
> be a standard sort of handling for a bank applicaion...

Depends on how you implement it: if you have the option to query the
current balance and define that a withraw operation is only allowed
with sufficient funds then you throw an exception.  If OTOH you define
that withdraw will return success then you have a boolean return
value.  Both approaches are legal and feasible.

Kind regards

robert

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/