Michael Schuerig
2009-Jun-01 15:20 UTC
Specific exceptions for database errors: please speak up
With ActiveRecord as it currently is, you get the same error for anything that might go wrong in the database, ActiveRecord::InvalidStatement. That''s rather undistinctive, considering that there are some problems only the database server can recognize, in particular violated uniqueness and foreign key constraints. If specific exceptions for these tow latter error conditions would help you in your code, or if you are interested in the topic in general, please review the following ticket and patch https://rails.lighthouseapp.com/projects/8994/tickets/2419-raise- specific-exceptions-for-violated-database-constraints Please state your opinion and/or support, for otherwise the issue might be delayed interminably. Thanks, Michael -- Michael Schuerig mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org http://www.schuerig.de/michael/