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

Data out-of-date -- docs/all-error-codes.md #891

Closed
gsjaardema opened this issue Mar 1, 2018 · 4 comments · Fixed by #2336
Closed

Data out-of-date -- docs/all-error-codes.md #891

gsjaardema opened this issue Mar 1, 2018 · 4 comments · Fixed by #2336

Comments

@gsjaardema
Copy link
Contributor

Not sure if it matters, but discovered while grepping the code tree for an error code translation that the values in all-error-codes.md are incomplete and in some cases incorrect. For example NC_EBADGRPID is -116 in netcdf.h, but listed as -113 in all-error-codes.md

@DennisHeimbigner
Copy link
Collaborator

I wonder if we could build a tool using e.g. awk to automatically
create all-error-codes.md from netcdf.h?

@edhartnett
Copy link
Contributor

The error codes are actually poorly documented in netcdf.h.

I suggest that we fix up the error documentation there.

I don' t think that programmers will naturally look to a separate documentation file for information, so I think all-error-codes.md is perhaps not needed.

@DennisHeimbigner
Copy link
Collaborator

A perhaps simple solution is to provide the documentation in the
doxygen documentation for the nc_strerror function and
modify all-error-codes.md to just tell people to look at the documentation for
nc_strerror. That way, at least everything is in a single file.

@edwardhartnett
Copy link
Contributor

edwardhartnett commented May 4, 2022

I believe we should remove all-error-codes.md, and in nc_strerror() we should simply refer to netcdf.h.

In netcdf.h we should (as we already have) document each error code with a doxygen comment.

If we do all this, doxygen will display the error codes just fine:

image

I will submit a PR with this change.

(Furthermore, when referring to these constants in the doxygen, we need to preceed them with a double-colon. Like ::NC_EACCESS

If we do that then the error code will be hyper-linked to it's definition in netcdf.h.)

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 a pull request may close this issue.

4 participants