-
Notifications
You must be signed in to change notification settings - Fork 16
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
serd_env_expand and SERD_ERR_BAD_CURIE #17
Comments
Not sure I agree. BAD_CURIE curie implies a syntax error and is used when reading, so this is the error you will get if you try to parse a file that contains a bad CURIE. For using the env API directly, it would be a bit weird for it to return BAD_CURIE if the string itself is a perfectly good curie (and not, say, missing a colon) but the prefix just isn't in the env. Perhaps "prefix does not exist" should be its own error to distinguish a syntactically invalid CURIE from an undefined prefix in both places? |
Just to be clear, I am saying that the documentation is unclear in this regard. Namely, that BAD_CURE literally says "prefix does not exist" in the docs. Not sure what you mean by "not agree" since I am only pointing out the confusion from a user's perspective. |
I meant agree with your expectation that I guess I could either simply remove the "prefix does not exist" from that comment, or make |
serd_env_expand
will returnSERD_ERR_NOT_FOUND
if the prefix does not exist / was not found, and yet the enum doc forSERD_ERR_BAD_CURIE
says: "Invalid CURIE (e.g. prefix does not exist)". Not a huge deal, but a bit redundant/confusing? Just intuitively, after the reading the docs, I would expectserd_env_expand
to return the 'bad curie' enum value instead of the 'not found' one.The text was updated successfully, but these errors were encountered: