Permalink
Browse files

The ol' rescue only catches StandardError and children issue. Unfortu…

…nately, the begin/rescue around active record transactions explicity catches Exception descendent classes, which means an exception not descending from StandardError (i.e. the ones thrown by mocha) will create an inconsistency between after_callback and activerecord.
  • Loading branch information...
1 parent 01ea4d5 commit 573f3f767eb6a26ab165bd2f0a53e43f80119698 Keith Simmons committed Apr 21, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/after_commit/after_savepoint.rb
@@ -52,7 +52,7 @@ def release_savepoint_with_callback
trigger_after_commit_on_save_callbacks
trigger_after_commit_on_update_callbacks
trigger_after_commit_on_destroy_callbacks
- rescue
+ rescue Exception => e
unless committed
decrement_transaction_pointer
rollback_to_savepoint

0 comments on commit 573f3f7

Please sign in to comment.