What steps will reproduce the problem?
1. Open a solution, select NiftyEdit from a context menu for a CPP file
2. Wait a few seconds.
3. If the server is unreachable (e.g. VPN not connected) or P4.exe returns an
error code Visual Studio will receive an exception thrown from NiftyPerforce
and be shut-down or restarted.
What is the expected output? What do you see instead?
I expect to see an error message (with explanation) instead of a crash.
What version of the product are you using? On what operating system?
Nifty Perforce 1.3.9. Windows 7 Ultimate, Visual Studio 2008
Please provide any additional information below.
This piece of code from RunCommand in AsyncProcess.cs throws an exception if
the ExitCode isn't 0, but the exception is never caught.
if (0 != process.ExitCode)
{
throw new Process.Error("Failed to execute {0} {1}, exit code was {2}", executable, process.StartInfo.Arguments, process.ExitCode);
}
The RunCommand method currently only catches
System.ComponentModel.Win32Exception exceptions which leads to Visual Studio
catching the exception and shutting down.
It's probably safer to catch all possible exceptions when executing a new
process?
catch(Exception e)
{..
}
Original issue reported on code.google.com by danie.co...@gmail.com on 10 Jul 2012 at 9:31
Original issue reported on code.google.com by
danie.co...@gmail.com
on 10 Jul 2012 at 9:31