Hi, ok let say I have 3 actions in some controller def first_action do_something rescue Exception => exc error_action(exc) end def second_action do_something_again rescue Exception => exc error_action(exc) end def third_action do_a_little_bit_of_somthing_here rescue Exception => exc error_action(exc) end protected def error_action(msg) flash["notice"] = msg redirect_to :action => "index" end Question is is there a better way writing this rescue Exception => exc error_action(exc) so that it doesn''t repeat and I don''t have to write it in every method (something like define at one place and automatically the methods know what to do on exceptions) Thanks in advance -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---