I have a mini-project and a lot of classes. I created an exception for a field, it doesn't work
public C(..., int yearX, ...) throws InitException {
if (year == 2000) {
...
year = yearX;
...
} else
throw new InitAnneeEC();
}