Wednesday, October 14, 2009

Ruby on Rails -try catch fainally block

Ruby On Rails in more human readable language than other languages. So ruby use try catch finally block also human readable form as follows.begin,rescue,ensure same as try catch finally

begin
somecode()
rescue

puts "error"
ensure

all_ways_execute_code
end

No comments:

Post a Comment