From: Kassym Dorsel Date: 2011-10-20T03:49:45+09:00 Subject: efficient way to catch & continue on exception I have the following : hs = {} hs.default = nil hs['name3'] = command3 hs['name2'] = command2 hs['name1'] = command1 Where command* are methods that can fail and raise an exception. The only way I know to deal with this is : begin hs['name3'] = command3 rescue end begin hs['name2'] = command2 rescue end begin hs['name1'] = command1 rescue end Is there a more compact/nicer of dealing with this. Because I have about 10-15 of these in a row in my code that I unfortunately can't change to anything better. What I would really want is something that if an exception is raised to skip that line and just continue with the next line. -- Posted via http://www.ruby-forum.com/.