mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Ensure we guard against all exceptions, not just StandardError
This commit is contained in:
parent
f4a7942de1
commit
8f76cca3d9
2 changed files with 3 additions and 2 deletions
|
@ -89,7 +89,7 @@ module ActiveSupport
|
|||
|
||||
listeners.each do |s|
|
||||
yield s
|
||||
rescue => e
|
||||
rescue Exception => e
|
||||
exceptions ||= []
|
||||
exceptions << e
|
||||
end
|
||||
|
|
|
@ -5,7 +5,8 @@ require_relative "../abstract_unit"
|
|||
module ActiveSupport
|
||||
module Notifications
|
||||
class EventedTest < ActiveSupport::TestCase
|
||||
class BadListenerException < RuntimeError; end
|
||||
# we expect all exception types to be handled, so test with the most basic type
|
||||
class BadListenerException < Exception; end
|
||||
|
||||
class Listener
|
||||
attr_reader :events
|
||||
|
|
Loading…
Reference in a new issue