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

Accessors (like GFF3.source) should return missing instead of throwing exceptions #17

Open
TheLostLambda opened this issue Oct 19, 2023 · 0 comments

Comments

@TheLostLambda
Copy link

The current behaviour makes things like filtering records by something like source difficult if any sources are missing (.).

I feel like returning missing might be a bit more idiomatic? It would also make the following code less perilous...

Iterators.filter(r -> GFF3.source(r) == "Pfam", reader)

which is the code currently crashing my whole script when it hits a single record missing a source.

Let me know if others agree that the API should return missing instead of throwing exceptions, and I'm more than happy to file a PR!

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

No branches or pull requests

1 participant