Better error message.
This commit is contained in:
parent
758412673e
commit
d74ec52441
1 changed files with 2 additions and 1 deletions
|
|
@ -124,7 +124,8 @@ public class Configuration implements Dto {
|
||||||
if (matcher.group(3) != null) {
|
if (matcher.group(3) != null) {
|
||||||
unit = unitMap.get(matcher.group(3));
|
unit = unitMap.get(matcher.group(3));
|
||||||
if (unit == null) {
|
if (unit == null) {
|
||||||
throw new NumberFormatException(amount.toString());
|
throw new NumberFormatException("Illegal unit \""
|
||||||
|
+ matcher.group(3) + "\" in \"" + amount.toString() + "\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var number = matcher.group(1);
|
var number = matcher.group(1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue