Update exception message to non-deprecated type.