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

OGRFeature: SetXXX() methods: more informative warning messages reporting field name and value for out-of-range values #10945

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

rouault
Copy link
Member

@rouault rouault commented Oct 5, 2024

Fixes #10915

@rouault rouault added this to the 3.10.0 milestone Oct 5, 2024
@rouault rouault force-pushed the fix_10915 branch 2 times, most recently from ee44817 to e0ba014 Compare October 5, 2024 13:35
@latot
Copy link

latot commented Oct 7, 2024

Hi! great PR!

I think would be nice, for the integer cases (or similar ones), add if they are signed/unsigned ones in the message.

Thx!

@rouault
Copy link
Member Author

rouault commented Oct 7, 2024

I think would be nice, for the integer cases (or similar ones)

the actual value that fails to be set is put in the error message

@latot
Copy link

latot commented Oct 7, 2024

Hi! yes, I means not the value's symbol (if is signed or not), the objective field type, in C++ a Integer 64 is Signed by default, while in other langs is not always the case, so I think would be good say explicitly if the field that is being used if is a signed or unsigned one.

This is also because this warning is for the final user, who does not needs to know in which lang this was done, helps for a clear description.

@rouault
Copy link
Member Author

rouault commented Oct 7, 2024

This is also because this warning is for the final user, who does not needs to know in which lang this was done, helps for a clear description.

I let it to others to further tweak that if that's needed. I believe this PR as it is sufficient.

Signedness of OFTInteger/OFTInteger64 explicited in 46ad0f1

@rouault rouault merged commit 3736c1c into OSGeo:master Oct 8, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve accuracy warning when types does not match
3 participants