NightOwl888 opened a new pull request #476:
URL: https://github.com/apache/lucenenet/pull/476


   Closes #446.
   
   This centralizes exception handling so it includes/excludes the 
corresponding exception types as in Java. There were also several bugs found 
where the wrong exception type was either being caught or thrown, and fixing 
them makes the tests run more consistently and may have even improved 
performance overall.
   
   Full tests were added for all known exception types in .NET, NUnit, and 
Lucene.NET so we have confirmation that our error handlers will only catch the 
exception types they are supposed to for the general exception types:
   
   - Error
   - Throwable
   - Exception
   - RuntimeException
   - IOException
   - IllegalArgumentException
   - IndexOutOfBoundsException
   
   Some of the exceptions (such as `NullReferenceException`, 
`IndexOutOfRangeException`, and `FormatException`) were factored out by 
checking to ensure the condition that causes the exception cannot occur.
   
   Also, the 
[`ExceptionDispatchInfo`](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.exceptionservices.exceptiondispatchinfo?view=net-5.0)
 class has been applied to Lucene's centralized error handling and background 
processing so we always get a full stack trace from the point where the 
exception began rather than a partial clue from where the exception was 
rethrown.


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to