Hello. Imagine how paranoid and ugly code would look if one put a ''begin,rescue, end'' in every action in the app... With server, mysql, etc errors, is there a way to rescue anything weird when (not if :( ) it were to ever happen? Thoughts? Dominic -- 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 -~----------~----~----~----~------~----~------~--~---
Look at the api.rubyonrails.com http://api.rubyonrails.com/classes/ActionController/Rescue.html#M000067 http://api.rubyonrails.com/classes/ActionController/Rescue.html#M000069 http://api.rubyonrails.com/classes/ActionController/Rescue.html#M000071 You add a function say, rescue_action, in application.rb and it will handle all your errors. -- 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 -~----------~----~----~----~------~----~------~--~---
Thank you very Much Roland. Hope you have a great week. Roland Mai wrote:> Look at the api.rubyonrails.com > > http://api.rubyonrails.com/classes/ActionController/Rescue.html#M000067 > http://api.rubyonrails.com/classes/ActionController/Rescue.html#M000069 > http://api.rubyonrails.com/classes/ActionController/Rescue.html#M000071 > > You add a function say, rescue_action, in application.rb and it will > handle all your errors.-- 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 -~----------~----~----~----~------~----~------~--~---