Skip to content

Commit

Permalink
[sarldoc] Add a main function that returns an exit code.
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Oct 6, 2019
1 parent 45e33c6 commit 92f5fc7
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions products/sarldoc/src/main/java/io/sarl/sarldoc/Main.java
Expand Up @@ -43,12 +43,26 @@ private Main() {
}

/** Main program of the API documentation generator.
*
* <p>This function never returns.
*
* @param args the command line arguments.
* @see #run(String...)
*/
public static void main(String[] args) {
final int retCode = createMainObject().runCommand(args);
System.exit(retCode);
System.exit(run(args));
}

/** Main program of the API documentation generator.
*
* <p>This function returns.
*
* @param args the command line arguments.
* @return the exit code.
* @see #main(String[])
*/
public static int run(String... args) {
return createMainObject().runCommand(args);
}

/** Replies the default name of the program.
Expand Down

0 comments on commit 92f5fc7

Please sign in to comment.