mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
Merge branch '130-check-result-to-stdout-causes-an-exception' into 'release/1.5.x'
Resolve "Check result to stdout causes an exception" See merge request kosit/validator!70
This commit is contained in:
commit
22910c1ca0
1 changed files with 10 additions and 2 deletions
|
|
@ -38,7 +38,11 @@ public class Printer {
|
|||
* @param params the params.
|
||||
*/
|
||||
public static void writeOut(final String message, final Object... params) {
|
||||
System.out.println(new MessageFormat(message, Locale.ENGLISH).format(params));
|
||||
try {
|
||||
System.out.println(new MessageFormat(message, Locale.ENGLISH).format(params));
|
||||
} catch (final RuntimeException ex) {
|
||||
System.err.println("[Format error!] <" + message + "> with params <" + params + ">");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -48,7 +52,11 @@ public class Printer {
|
|||
* @param params the params.
|
||||
*/
|
||||
public static void writeErr(final String message, final Object... params) {
|
||||
System.err.println(new MessageFormat(message, Locale.ENGLISH).format(params));
|
||||
try {
|
||||
System.err.println(new MessageFormat(message, Locale.ENGLISH).format(params));
|
||||
} catch (final RuntimeException ex) {
|
||||
System.err.println("[Format error!] <" + message + "> with params <" + params + ">");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue