From: Brian Candler Date: 2012-11-16T06:39:07+09:00 Subject: Re: Question on exceptions Justin Gamble wrote in post #1084633: > Like I said above, the two operations that I want this program to do > are: > 1) When making a withdrawal, it cant withdraw if there are insufficient > funds thus prompting the InsufficientFundsError To raise an exception when the condition is met: raise InsufficientFundsError.new(1234,50,100) However you will need to change your class so that it is a subclass of an existing exception, e.g. class InsufficientFundsError < RuntimeError ... end and you will need to make the other corrections to these classes which should become obvious when you run and debug the program. -- Posted via http://www.ruby-forum.com/.