Szymon Nowak wrote in post #988178: > You are re-raising the exception in rescue block. Try to modify the > rescue > block like this: > > rescue Exception => e > flash.now[:error]="error: #{e.message}" > end
thank you,szimek,chaitanyv.it seems we just need to rescue the exception,and no need to re-raise exception.but i do not know why nearly all the examples in the book <programming ruby> re-raise the exceptions.i think i have misunderstood the exception in ruby.if an exception raises in the end used method,we generally do a final capture,and no need to reraise,am i right? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.