Forum: Ruby on Rails Specific exceptions for database errors: please speak up

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bce1d1b7c3ec7b577dcb42e254899e6b?d=identicon&s=25 Michael Schuerig (Guest)
on 2009-06-01 17:20
(Received via mailing list)
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/tick...
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@schuerig.de
http://www.schuerig.de/michael/
This topic is locked and can not be replied to.