internal virtual void MaybeThrowIOExceptionOnOpen(string name)
{
if (RandomState.NextDouble() < RandomIOExceptionRateOnOpen_Renamed)
{
/*if (LuceneTestCase.VERBOSE)
{
Console.WriteLine(Thread.CurrentThread.Name + ": MockDirectoryWrapper: now throw random exception during open file=" + name);
(new Exception()).printStackTrace(System.out);
}*/
if (AllowRandomFileNotFoundException_Renamed == false || RandomState.NextBoolean())
{
throw new System.IO.IOException("a randomSystem.IO.IOException (" + name + ")");
}
else
{
throw RandomState.NextBoolean() ? new FileNotFoundException("a randomSystem.IO.IOException (" + name + ")") : new FileNotFoundException("a randomSystem.IO.IOException (" + name + ")");
}
}
}