rails/rails — pull request #17806 by yuki24 (2014-11-27 21:23:00+00:00)
Title: Fixed a bug where AR::RecordNotSaved & RecordNotDestroyed lost an error message

Since 3e30c5d4222f816cdffd5241d56ef9442f6d1903, `AR::RecordNotSaved` and `AR::RecordNotDestroyed` started ignoring error messages. This commit changes the behavior of `#initialize` so that these exceptions no longer lose the given message.

Also, when calling `AR::Base.save!` or `AR::Base.destroy!` and raising one of the exceptions, give a meaningful error message so that people can easily understand why it's failing to save/destroy.