Consider simplifying by using an existing runtime exception type such as IllegalArgumentException. Either way is fine, just bringing it up as an idea...