Skip to content

Commit

Permalink
Adding log in case of number format exception
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianromero committed Jul 23, 2019
1 parent c91bafd commit 884786a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ protected MiniVar valueImpl(String value) {
try {
return new MiniVarDouble(Double.parseDouble(value));
} catch (NumberFormatException ex) {
logger.warning(() -> "Cannot parse Double: " + value);
return MiniVarDouble.NULL;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ protected MiniVar valueImpl(String value) {
try {
return new MiniVarInt(Integer.parseInt(value));
} catch(NumberFormatException ex) {
logger.warning(() -> "Cannot parse Int: " + value);
return MiniVarInt.NULL;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ protected MiniVar valueImpl(String value) {
try {
return new MiniVarLong(Long.parseLong(value));
} catch (NumberFormatException ex) {
logger.warning(() -> "Cannot parse Long: " + value);
return MiniVarLong.NULL;
}
}
Expand Down

0 comments on commit 884786a

Please sign in to comment.