getErrorCollector().failIfErrors();
}
public void applyToGeneratedGroovyClasses(GroovyClassOperation body) throws CompilationFailedException {
if (this.phase != Phases.OUTPUT && !(this.phase == Phases.CLASS_GENERATION && this.phaseComplete)) {
throw new GroovyBugError("CompilationUnit not ready for output(). Current phase=" + getPhaseDescription());
}
for (GroovyClass gclass : this.generatedClasses) {
//
// Get the class and calculate its filesystem name
//
try {
body.call(gclass);
} catch (CompilationFailedException e) {
// fall through, getErrorReporter().failIfErrors() will trigger
} catch (NullPointerException npe) {
throw npe;
} catch (GroovyBugError e) {
changeBugText(e, null);
throw e;
} catch (Exception e) {
throw new GroovyBugError(e);
}
}
getErrorCollector().failIfErrors();
}