Fix pull request #1961: add more hasExceptionTraps checks
Merge pull request #2039 from jpf91/fix1961

Fix pull request #1961: add more hasExceptionTraps checks