vvdb-architecture commented on issue #271:
URL: https://github.com/apache/lucenenet/issues/271#issuecomment-1206074605

   Throwing exceptions in Dispose() is bad form.
   See 
https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1065
   Or 
https://docs.microsoft.com/en-us/dotnet/api/system.idisposable.dispose?view=net-6.0:
   
   > If an object's 
[Dispose](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable.dispose?view=net-6.0)
 method is called more than once, the object must ignore all calls after the 
first one. The object must not throw an exception if its 
[Dispose](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable.dispose?view=net-6.0)
 method is called multiple times. Instance methods other than 
[Dispose](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable.dispose?view=net-6.0)
 can throw an 
[ObjectDisposedException](https://docs.microsoft.com/en-us/dotnet/api/system.objectdisposedexception?view=net-6.0)
 when resources are already disposed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to