use of org.eclipse.xtext.xtext.generator.IXtextGeneratorFragment in project xtext-core by eclipse.
the class CompositeGeneratorFragment2 method generate.
@Override
public void generate() {
final CompositeGeneratorException composite = new CompositeGeneratorException();
for (final IXtextGeneratorFragment fragment : this.fragments) {
try {
fragment.generate();
} catch (final Throwable _t) {
if (_t instanceof Exception) {
final Exception e = (Exception) _t;
composite.addException(e);
} else {
throw Exceptions.sneakyThrow(_t);
}
}
}
boolean _hasExceptions = composite.hasExceptions();
if (_hasExceptions) {
throw composite;
}
}
Aggregations