Does a rollback still occur if I use begin...rescue and an error occurs?

Posted by codeman73 on Stack Overflow See other posts from Stack Overflow or by codeman73
Published on 2010-04-16T18:09:00Z Indexed on 2010/04/16 18:13 UTC
Read the original article Hit count: 227

I've got some strange errors happening in my rails app and I'm trying to log better errors instead of the whole stack of passenger stuff that I don't care about. I thought I would do this with a Rescue clause and explicit error handling, like logging the params hash. But I'm concerned if this would interrupt any rollback that is happening. For that matter, I'm assuming rollbacks automatically occur when an error occurs as part of the normal rails error handling, but I haven't been able to find that documented anywhere. I'm using Dreamhost with MySQL, so I thought transactions and rollbacks were happening there.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about transactions