// Append the output to stderr, stdout and the StringBuffer;
final StringBufferExec executeCommands = new StringBufferExec(true);
int returnCode = 0;
try {
codeGenerator.setExecuteCommands(executeCommands);
returnCode = codeGenerator.generateCode();
} catch (Exception e) {
throw new IllegalActionException(actor, e,
"Failed to generate code.");
}