-
Notifications
You must be signed in to change notification settings - Fork 48
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
Better error when disposed resources are accessed #243
Comments
Yes, I guess this sounds reasonable. This will break the public API of course. Also this test would need to be changed
👍 |
Some of the classes like This should make checking for correct disposal a lot easier, since now the parent instances can have an internal |
In C# it's pretty easy to accidentally dispose of a resource whilst it's still being used by a task - if you end up reading a file using ParquetSharp after the
ParquetFileReader
has been disposed then in stead of getting a (more useful)ObjectDisposedException
, the library in stead returns incorrect data.An explicit version of what I ended up doing (yes, looks very silly when made explicit) was:
This issue covers having the reader APIs throw
ObjectDisposedException
to make it clearer to the user how they've misused the library. There's a non-zero chance I might have time to produce a PR for this one.The text was updated successfully, but these errors were encountered: