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

Exceptions not documented when opening a file #598

Open
jdh28 opened this issue May 23, 2022 · 1 comment
Open

Exceptions not documented when opening a file #598

jdh28 opened this issue May 23, 2022 · 1 comment

Comments

@jdh28
Copy link

jdh28 commented May 23, 2022

It would be useful for methods like ExcelReaderFactory.CreateReader to document the possible exceptions that can be thrown.

For example, we had a corrupted .xlsx file that threw a System.IO.InvalidDataException, which surprisingly does not derive from IOException.

@jdh28
Copy link
Author

jdh28 commented May 23, 2022

I would be happy to submit a PR to fix this if it is wanted.

The simplest fix is to list all the possible exceptions, but actually, I think it would be more useful to catch at least some of the possible exceptions and wrap them in ExcelReaderException. But this is probably a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants