Skip to content

Commit 1beb0ff

Browse files
authored
Remove message from ActiveRecord::Rollback example
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.
1 parent fe43770 commit 1beb0ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/active_record/errors.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ class StrictLoadingViolationError < ActiveRecordError
326326
# # The system must fail on Friday so that our support department
327327
# # won't be out of job. We silently rollback this transaction
328328
# # without telling the user.
329-
# raise ActiveRecord::Rollback, "Call tech support!"
329+
# raise ActiveRecord::Rollback
330330
# end
331331
# end
332332
# # ActiveRecord::Rollback is the only exception that won't be passed on

0 commit comments

Comments
 (0)