Skip to content

Commit

Permalink
Remove message from ActiveRecord::Rollback example
Browse files Browse the repository at this point in the history
Do not suggest that raising `ActiveRecord::Rollback` exception should have a message.

There's no point of adding a message to `ActiveRecord::Rollback` exception because it will be rescued by transaction block and the message will be lost.
  • Loading branch information
guigs committed Oct 5, 2021
1 parent fe43770 commit 1beb0ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/errors.rb
Expand Up @@ -326,7 +326,7 @@ class StrictLoadingViolationError < ActiveRecordError
# # The system must fail on Friday so that our support department
# # won't be out of job. We silently rollback this transaction
# # without telling the user.
# raise ActiveRecord::Rollback, "Call tech support!"
# raise ActiveRecord::Rollback
# end
# end
# # ActiveRecord::Rollback is the only exception that won't be passed on
Expand Down

0 comments on commit 1beb0ff

Please sign in to comment.