mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
12-FixCodeMaturityIssues
This commit is contained in:
parent
1952ea6787
commit
76c331acd1
2 changed files with 6 additions and 2 deletions
|
|
@ -87,7 +87,6 @@ public class Validator {
|
||||||
returnValue = ReturnValue.CONFIGURATION_ERROR;
|
returnValue = ReturnValue.CONFIGURATION_ERROR;
|
||||||
}
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
e.printStackTrace();
|
|
||||||
Printer.writeErr(e.getMessage());
|
Printer.writeErr(e.getMessage());
|
||||||
if (cmd.isDebugOutput()) {
|
if (cmd.isDebugOutput()) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
package de.kosit.validationtool.impl;
|
package de.kosit.validationtool.impl;
|
||||||
|
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
|
@ -62,7 +64,10 @@ public class Printer {
|
||||||
public static void writeErr(final Exception ex, final String message, final Object... params) {
|
public static void writeErr(final Exception ex, final String message, final Object... params) {
|
||||||
writeErr(message, params);
|
writeErr(message, params);
|
||||||
if (ex != null) {
|
if (ex != null) {
|
||||||
ex.printStackTrace();
|
StringWriter sw = new StringWriter();
|
||||||
|
PrintWriter pw = new PrintWriter(sw);
|
||||||
|
ex.printStackTrace(pw);
|
||||||
|
writeErr(sw.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue