Check only if an exception occurred if an exception expected