Swallow exceptions raised when checking if exception should be excluded

This fixes some issues in Ruby 1.8.7 when exception's class redefines
`==` method.