mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
(Fix) https://projekte.kosit.org/kosit/validator/-/issues/95 NPE when using empty repository definition (-r "")
This commit is contained in:
parent
38ab54438c
commit
b244f73d3a
3 changed files with 45 additions and 43 deletions
|
|
@ -17,6 +17,7 @@
|
|||
package de.kosit.validationtool.cmd;
|
||||
|
||||
import static de.kosit.validationtool.impl.Printer.writeErr;
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.fusesource.jansi.AnsiConsole;
|
||||
|
|
@ -96,7 +97,8 @@ public class CommandLineApplication {
|
|||
}
|
||||
|
||||
private static int logExecutionException(final Exception ex, final CommandLine cli, final ParseResult parseResult) {
|
||||
Printer.writeErr(ex, ex.getMessage());
|
||||
final String message = isNotEmpty(ex.getMessage()) ? ex.getMessage() : "Es ist eine Fehler aufgetreten";
|
||||
Printer.writeErr(ex, message);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue