Skip to content

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

@TheLostLambda

Description

@TheLostLambda

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions