Skip to content

Commit

Permalink
[#6326] improve(CLI): Make CLI more extendable and maintainable.
Browse files Browse the repository at this point in the history
add error handle.
  • Loading branch information
Abyss-lord committed Jan 21, 2025
1 parent 13ea1f1 commit 637b9d4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,12 @@ protected void outputInfo(String message) {
}

protected void outputError(String message) {
outputError(message, false);
}

protected void outputError(String message, boolean exit) {
output(message, System.err);
if (exit) Main.exit(-1);
}

protected void output(String message, OutputStream os) {
Expand Down

0 comments on commit 637b9d4

Please sign in to comment.