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 failure when opening CSV #684

Merged
merged 3 commits into from
Nov 27, 2023

Conversation

robertbartel
Copy link
Contributor

Adding errno and associate description for error to runtime_error thrown when failing to create ifstream for in CSVReader::getData().

Adding errno and associate description for error to runtime_error thrown
when failing to create ifstream for in CSVReader::getData().
@robertbartel robertbartel added the enhancement New feature or request label Nov 27, 2023
Updating error messaging further in CSVReader::getData() to use errno
for more detailed info when possible but fall back to general message if
errno was not set by the failure.
PhilMiller
PhilMiller previously approved these changes Nov 27, 2023
Copy link
Contributor

@PhilMiller PhilMiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formally, we may also need #include <cerrno> to be strictly portable

@robertbartel
Copy link
Contributor Author

@PhilMiller, I did go ahead and add the include of <cerrno> now to avoid someone eventually running into a problem with that.

@PhilMiller PhilMiller merged commit 51d4dbd into NOAA-OWP:master Nov 27, 2023
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants