public Subclass(String[] parameters) throws IllegalArgumentException {
super("Rectangle", Double.parseDouble(parameters[0]),
Double.parseDouble(parameters[1]),
90,
Double.parseDouble(parameters[2]),
Double.parseDouble(parameters[3]));
if(parameters.length != 4) throw new IllegalArgumentException(
"bla, bla");
if(parameters == null) throw new IllegalArgumentException(
"bla, bla");
}
I would like to put these 2 if statements before calling super-constructor. I know that I can't do that, so what's the painless way to do that kind of parsing of parameters (throwing Exception) before calling super()?