Explicitly declare the expected exception.