Skip to content

Consider catching exceptions in io.ascii readers and raising as InconsistentTableError #3346

@taldcroft

Description

@taldcroft

Currently in the guessing process there are four exceptions that are handled in a failed read attempt: core.InconsistentTableError, ValueError, TypeError, AttributeError. The last one was added in #3342 to fix a problem with tables that almost look like DAOphot.

A different way to approach this is to pro-actively catch expected parsing errors in the various readers and re-raise as InconsistentTableError or possibly subclasses there-of. This would have the benefit of forcing scrutiny of the various failure paths and then providing users with better feedback for what went wrong. This would be immediately beneficial in the no-guess case. It could also be useful for guessing since we might provide a mode to print out the exception message for each guess try. Currently this isn't that useful since the exceptions are not always something that the user can make sense of.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions