Koalemos
2007-Aug-12 04:57 UTC
How do I handle a 404 error from the open method in OpenURI
I was wondering if someone could quickly help me out with how i would go about handling a 404 error on a page i try and use the open method on. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
jemminger
2007-Aug-13 05:05 UTC
Re: How do I handle a 404 error from the open method in OpenURI
begin open(some_url) rescue something_went_wrong end On Aug 12, 12:57 am, Koalemos <swimming.b...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I was wondering if someone could quickly help me out with how i would > go about handling a 404 error on a page i try and use the open method > on.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Koalemos
2007-Aug-13 17:56 UTC
Re: How do I handle a 404 error from the open method in OpenURI
hrm, i only asked here because i tried that and it didnt work :(. i''ll give it another look maybe something else is amiss., Thanks On Aug 13, 1:05 am, jemminger <jemmin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> begin > open(some_url) > rescue > something_went_wrong > end > > On Aug 12, 12:57 am, Koalemos <swimming.b...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I was wondering if someone could quickly help me out with how i would > > go about handling a 404 error on a page i try and use the open method > > on.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---