}
int code = executor.waitForExit(); // throws ProcessExecutingException, InterruptedException
System.err.println("Compilation process exited with code " + code);
System.err.println("Compilation process was run for " + executor.getWorkTime());
if (executor.isOutOfTime()) {
throw new CompilationTimeLimitExceededException(
"Compilation process is out of time");
}
if (!program.canExecute()) {
processMessage(program);
throw new CompilationErrorException(message.toString());