Changeset 1934


Ignore:
Timestamp:
Sep 20, 2012, 2:50:18 PM (11 years ago)
Author:
sam
Message:

vslol: detect when the utilities cannot be launched.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/vslol/MenuGenerateCompilers.cs

    r1932 r1934  
    185185            p.StartInfo.RedirectStandardInput = true;
    186186            p.StartInfo.UseShellExecute = false;
    187             Trace.WriteLine("Executing " + executable + " in " + directory + " with args: " + arguments);
    188             p.Start();
    189             string output = p.StandardError.ReadToEnd()
    190                           + p.StandardOutput.ReadToEnd();
    191             p.WaitForExit();
    192             WriteToOutputPane(output);
     187
     188            try
     189            {
     190                p.Start();
     191                string output = p.StandardError.ReadToEnd()
     192                              + p.StandardOutput.ReadToEnd();
     193                p.WaitForExit();
     194                WriteToOutputPane(output);
     195                if (p.ExitCode != 0)
     196                    WriteToOutputPane("Error: " + executable + " exited with code " + p.ExitCode + "\n");
     197            }
     198            catch (Exception e)
     199            {
     200                WriteToOutputPane("Error: failed to launch " + executable + "\n");
     201            }
    193202        }
    194203
Note: See TracChangeset for help on using the changeset viewer.