What exception to throw when an important parameter/dependency is missing?
- by Pentium10
Take this method
public List<String> getGroups() {
if (this.getId().equals("")) return null;
}
I would like to throw exception instead returning null, what's the exception to throw when an important parameter/dependency has not been set?