> [...]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?

You are right. Catching and re-raising the exception is used if you
want to do something when the exception happens but you don't want to
fully handle the exception. For example, if you would like to log it
but you don't want to be responsible for handling the problem. If in
your case catching the exception to update the flash is enough then
that's all you need and you don't have to re-raise.

-- 
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.

Reply via email to