mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-27 00:01:05 +08:00
fix raise_error() to catch all exceptions
This commit is contained in:
@@ -160,7 +160,7 @@ class Object
|
||||
begin
|
||||
obj.call
|
||||
__assert__(!res, true, "Expected `#{klass}' to be raised, but nothing happened")
|
||||
rescue => e
|
||||
rescue Exception => e
|
||||
__assert__(e.is_a?(klass), res, "Expected `#{klass}' to be raised, got `#{e}'")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user