Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message for insufficient number/format of arguments #261

Open
teobais opened this issue Sep 25, 2019 · 2 comments
Open

Improve error message for insufficient number/format of arguments #261

teobais opened this issue Sep 25, 2019 · 2 comments

Comments

@teobais
Copy link
Member

teobais commented Sep 25, 2019

No Unit found is not descriptive at all.

We should at least make that error message more clear for cases like:

  • "75kg" instead of "75 kg"

Our assumption for parsing a compound quantity is that there will be a space character between the value and the unit

@keilw
Copy link
Member

keilw commented Sep 27, 2019

I don't know if we'd get any more than Exception in thread "main" java.lang.NumberFormatException: For input string: "100.95" which the JDK Integer class gives when trying to parse a decimal string. The "75 kg" would require the correct value after it was parsed, we cannot assume or construct that in this particular situation, but showing all or the relevant section of that compound string looks doable.

@keilw keilw added this to the 2.1 milestone Sep 27, 2020
@keilw keilw removed this from the 2.1 milestone Nov 14, 2020
@keilw keilw added the prio:3 Priority 3 label Jun 9, 2021
@somayaj
Copy link

somayaj commented Jul 6, 2022

Hi, can this be assigned to me? Will be willing to contribute. Also, a code pointer. thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants