{
unit.compile(Phases.CLASS_GENERATION);
}
catch (CompilationFailedException e)
{
throw new JRException(
"Errors were encountered when compiling report expressions class file:\n"
+ e.toString(),
e
);
}
if (collector.classes.size() < units.length)
{
throw new JRException("Too few groovy class were generated.");
}
else if (collector.classCount > units.length)
{
throw new JRException(
"Too many groovy classes were generated.\n"
+ "Please make sure that you don't use Groovy features such as closures that are not supported by this report compiler.\n"
);
}