Benutzer-Werkzeuge

Webseiten-Werkzeuge


onlineide:integration:onlineideexitstatusaccess

Dies ist eine alte Version des Dokuments!


Zugriff auf Exit-Status der Programmausführung von anderen Skripten aus

### A. Callback when Online-IDE initialization is finished and `window.online_ide_access` is defined If you assign a function to `window.online_ide_onReady` it will be called when `window.online_ide_access` is defined, e.g. ```javascript window.online_ide_onReady = () ⇒ {

  let ide = window.online_ide_access.getIDE('abcd');
  ide.registerOnRunExitListener((exitStatus)=>{console.log(exitStatus);});

} ```

### B. exitStatus object Inside the `exitStatus` object you find these fields: ```javascript export type ExitStatus = {

  exitCode: number;             // if program exited via System.exit(int code)
  output: string;                    // program output generated via print() and println()
  exception?: IThrowable;
  testProgress?: TestProgress;   

} ``` Where `testProgress` is a tree containing all test results: ```javascript type TestProgress = {

  overall: number,
  passed: number,
  failed: number,
  classIdentifier: string,
  methodIdentifier: string,
  children: TestProgress[]

} ```

onlineide/integration/onlineideexitstatusaccess.1788416662.txt.gz · Zuletzt geändert: von martin