boolean caughtException = false;
try {
RuleBasedNumberFormat fmt = new RuleBasedNumberFormat(tests[i], Locale.US);
logln("1.23: " + fmt.format(20));
logln("-123: " + fmt.format(-123));
logln(".123: " + fmt.format(.123));
logln(" 123: " + fmt.format(123));
}
catch (Exception e) {
if (!except) {
errln("Unexpected exception: " + e.getMessage());