From: Dale Martenson Date: 2007-04-05T04:35:10+09:00 Subject: Re: A Syntax question.. On Apr 4, 1:01 pm, Sonny Chee wrote: > Hey Guys, > > I would have thought the following two code snippets were equivalent. > However, only the first one will raise err. Can someone explain to me > how I should be 'reading' the 2nd snippet? > > rescue Exception => err > begin > RDoc::usage > rescue SystemExit > end > raise err > > rescue Exception => err > begin RDoc::usage rescue SystemExit end > raise err > > Sonny. > > -- > Posted viahttp://www.ruby-forum.com/. This may be wrong, but this works: begin raise err rescue Exception => err begin puts "bummer 1" raise err2 rescue Exception => err2 puts "bummer 1.1" end end .vs. begin raise err rescue Exception => err begin puts "bummer 2"; raise err2; rescue Exception =>err2; puts "bummer 2.1"; end end