In most other languages, the catch and throw statements do what the begin, rescue, and raise statements do in Ruby. I know the you can do this with these two statements ...
catch :done do
puts "I'm done."
end
if some_condition
throw :done
end
But what is this useful for? Can somebody please give me an example of what catch and throw statements are used for in Ruby?