updated test to intercept more exact exception types