Hi all, I use rescue_action_in_public(e) and rescue_action_locally(e) methods for catching the controller exceptions. I render some templates, also the standard error static html pages. Is there any other standard way to handle controller exceptions? Regards, Anil Wadghule http://anilwadghule.com/blog --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I render some templates, also the> standard error static html pages. Is there any other standard way to > handle > controller exceptions?checkit: def action_in_controller # a couple of bad statements that raise errors; per error, it gets sent to the # rescue clause that catches that specific error: foo = 5 + "string" # TypeError bar = ActiveRecordModel.find(23452345234523452345234) # RecordNotFound blah = "nochie" + un_inited_var ... ... .... rescue TypeError render_text "we added two bad datatypes" rescue RecordNotFound render_text "we looked up a record that doesn''t exist" rescue render_text "generic rescue" end :) shai -- 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 -~----------~----~----~----~------~----~------~--~---