Hello, How does one go about catching db errors, such as: Mysql::Error in BlogController#index Can''t connect to local MySQL server through socket ''/tmp/mysql.sock'' (2) I''d rather render the error in my own layout (I do have one named application) -- Cheers, Serdar Kilic http://weblog.kilic.net/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> Hello, > How does one go about catching db errors, such as: > > Mysql::Error in BlogController#index > Can''t connect to local MySQL server through socket ''/tmp/mysql.sock'' (2) > > I''d rather render the error in my own layout (I do have one named > application)Look at the specific exception that is being thrown and then deal with it in a begin/rescue/end block... -philip --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---