Skip to content
This repository was archived by the owner on Oct 9, 2024. It is now read-only.
This repository was archived by the owner on Oct 9, 2024. It is now read-only.

How should IMDReader handle connection refused? #6

@ljwoods2

Description

@ljwoods2

If reader raises ConnectionRefusedError in first iteration, protoreader's next() catches it since ConnectionRefusedError is an IOError

    def next(self) -> Timestep:
        """Forward one step to next frame."""
        try:
            ts = self._read_next_timestep()
        except (EOFError, IOError):
            self.rewind()
            raise StopIteration from None

How will the user know they never connected to the gromacs server? Can we just issue a warning?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions