Re: [Rails] Re: exception handling not working?
Plain "rescue" just catches exceptions derived from the StandardError class.
IIRC, "rescue Exception" will catch everything.
HTH,
Jeffrey
Quoting Rajinder Yadav <devguy.ca@gmail.com>:
> OK I figured out this is a bug with webbrick, it errors out and then
> crashes!
>
> I installed passenger + nginx and the code works as expected.
>
> Rajinder
>
> On 11-10-25 08:29 AM, Rajinder Yadav wrote:
> >I am playing with Rails 3.1.1 and made a simple blog app.
> >
> >I created a unique index on a field and when I submit a new post,
> >it throws an exception if the field is not unique. I've added a
> >rescue, but it's not doing anything? What am I doing wrong.
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home