Open
Conversation
| if (i1 < 0 || i2 >= row_size_ || j1 < 0 || j2 >= column_size_) | ||
| { | ||
| return std::numeric_limits<double>::quiet_NaN(); | ||
| throwGeoidError("Input coordinates are outside the JPGEO2024 grid."); |
There was a problem hiding this comment.
For consistency with the other out-of-range error at line 156-158, consider including the actual coordinates in this error message as well to help with debugging.
Suggested change
| throwGeoidError("Input coordinates are outside the JPGEO2024 grid."); | |
| std::ostringstream oss; | |
| oss << "Input coordinates are outside the JPGEO2024 grid: " << lat << ", " << lon; | |
| throwGeoidError(oss.str()); |
| if (f00 == -9999.0 || f10 == -9999.0 || f01 == -9999.0 || f11 == -9999.0) | ||
| { | ||
| return std::numeric_limits<double>::quiet_NaN(); | ||
| throwGeoidError("Error: Not supported area"); |
There was a problem hiding this comment.
The error message for unsupported areas could be more informative by including the coordinates that caused the error.
Suggested change
| throwGeoidError("Error: Not supported area"); | |
| std::ostringstream oss; | |
| oss << "Error: Not supported area at coordinates: " << lat << ", " << lon; | |
| throwGeoidError(oss.str()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exitor silentNaNtostd::runtime_errorHeightConverterandLLHConverterTesting
docker exec zealous_shamir bash -lc 'source /opt/map4api/ament/install/setup.bash && source /media/sasaki/aiueo/m4e_v2/dev_260202/install/setup.bash && cd /media/sasaki/aiueo/m4e_v2/dev_260126_m4e124 && colcon --log-base .review/m4e124/log build --packages-select llh_converter --build-base .review/m4e124/build --install-base .review/m4e124/install --cmake-args -DBUILD_TESTING=OFF && source .review/m4e124/build/llh_converter/devel/setup.bash && .review/m4e124/build/llh_converter/devel/lib/llh_converter/llh_test'\n\n## Note\n- existing JPGEO2024 value comparisons inllh_teststill show the same mismatch in this environment; this PR only changes error handling paths.