int javacExitCode,
Main.ExitState exitState) {
if (exitState == null) {
throw new IllegalStateException("Missing ExitState, " + javacExitCode);
}
CeylonState ceylonState = exitState.ceylonState;
switch (ceylonState) {
case OK:
break;
case ERROR:
throw new CompilerErrorException(exitState.errorCount);