2008/4/23, Michael W. Ryder <_mwryder / worldnet.att.net>: > One thing I haven't figured out is returning from an exception to the > calling location. In Business Basic I can set a location that the program > will go to when an untrapped error occurs. From there I can handle the > error and return back to the program. > I can also do the same if the Escape key is pressed, or I can go to a new > location and continue. This comes in real handy when an operator is > finished with data entry they just press the Escape key to save the changes > and continue. That would be "retry": irb(main):009:0> def test(x) raise "#{x} is too low" if x < 5 end => nil irb(main):010:0> i = 0 => 0 irb(main):011:0> begin; puts i; test i; rescue Exception => e; puts e; i+=1; retry; end 0 0 is too low 1 1 is too low 2 2 is too low 3 3 is too low 4 4 is too low 5 => nil irb(main):012:0> Kind regards robert -- use.inject do |as, often| as.you_can - without end