38 exception?.GetType() == typeof(DllNotFoundException) &&
39 exception.Message.Contains(
"python");
49 var dnfe = (DllNotFoundException)exception;
51 var startIndex = dnfe.Message.IndexOfInvariant(
"python");
52 var length = Math.Min(dnfe.Message.Length - startIndex, 10);
53 var dllName = dnfe.Message.Substring(startIndex, length);
55 length = dllName.IndexOfInvariant(
'\'');
58 dllName = dllName.Substring(0, length);
61 var platform = Environment.OSVersion.Platform.ToString();
63 return new DllNotFoundException(message, dnfe);