public static void RunMonoProcess(Process process, string name, string resultingFile)
{
MonoProcessRunner monoProcessRunner = new MonoProcessRunner();
bool flag = monoProcessRunner.Run(process);
if (process.ExitCode != 0 || !File.Exists(resultingFile))
{
string message = "Failed " + name + ": " + MonoProcessUtility.ProcessToString(process) + " result file exists: " + (object) File.Exists(resultingFile) + ". Timed out: " + (object) !flag + "\n\n" + "stdout:\n" + (object) monoProcessRunner.Output + "\n" + "stderr:\n" + (object) monoProcessRunner.Error + "\n";
Console.WriteLine(message);
throw new UnityException(message);
}
}