Skip to content

Commit 56d75d8

Browse files
authored
add .net core exception info (#4244)
1 parent e63b478 commit 56d75d8

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

xml/System.Diagnostics/Process.xml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,7 @@ The following code example creates a process that prints a file. It sets the <xr
16291629
<exception cref="T:System.ArgumentException">The <paramref name="machineName" /> parameter syntax is invalid. It might have length zero (0).</exception>
16301630
<exception cref="T:System.ArgumentNullException">The <paramref name="machineName" /> parameter is <see langword="null" />.</exception>
16311631
<exception cref="T:System.PlatformNotSupportedException">The operating system platform does not support this operation on remote computers.</exception>
1632-
<exception cref="T:System.InvalidOperationException">There are problems accessing the performance counter API's used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP.</exception>
1632+
<exception cref="T:System.InvalidOperationException">There are problems accessing the performance counter APIs used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP.</exception>
16331633
<exception cref="T:System.ComponentModel.Win32Exception">A problem occurred accessing an underlying system API.</exception>
16341634
<altmember cref="P:System.Diagnostics.Process.MachineName" />
16351635
<altmember cref="M:System.Diagnostics.Process.GetProcessById(System.Int32,System.String)" />
@@ -1711,7 +1711,7 @@ The following code example creates a process that prints a file. It sets the <xr
17111711

17121712
]]></format>
17131713
</remarks>
1714-
<exception cref="T:System.InvalidOperationException">There are problems accessing the performance counter API's used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP.</exception>
1714+
<exception cref="T:System.InvalidOperationException">There are problems accessing the performance counter APIs used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP.</exception>
17151715
<altmember cref="P:System.Diagnostics.Process.ProcessName" />
17161716
<altmember cref="M:System.Diagnostics.Process.GetProcessById(System.Int32,System.String)" />
17171717
<altmember cref="M:System.Diagnostics.Process.GetProcesses" />
@@ -1795,7 +1795,7 @@ The following code example creates a process that prints a file. It sets the <xr
17951795

17961796
-or-
17971797

1798-
There are problems accessing the performance counter API's used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP.</exception>
1798+
There are problems accessing the performance counter APIs used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP.</exception>
17991799
<exception cref="T:System.ComponentModel.Win32Exception">A problem occurred accessing an underlying system API.</exception>
18001800
<altmember cref="P:System.Diagnostics.Process.ProcessName" />
18011801
<altmember cref="P:System.Diagnostics.Process.MachineName" />
@@ -2228,9 +2228,9 @@ You cannot cause processes on remote computers to exit. You can only view inform
22282228
<exception cref="T:System.NotSupportedException">You are attempting to call <see cref="M:System.Diagnostics.Process.Kill" /> for a process that is running on a remote computer. The method is available only for processes running on the local computer.</exception>
22292229
<exception cref="T:System.InvalidOperationException">The process has already exited.
22302230

2231-
-or-
2232-
2233-
There is no process associated with this <see cref="T:System.Diagnostics.Process" /> object.
2231+
-or-
2232+
2233+
There is no process associated with this <see cref="T:System.Diagnostics.Process" /> object.
22342234

22352235
-or-
22362236

@@ -5367,9 +5367,7 @@ The file specified in the <paramref name="fileName" /> could not be found.
53675367

53685368
You should only access the <xref:System.Diagnostics.Process.StartInfo%2A> property on a <xref:System.Diagnostics.Process> object returned by the <xref:System.Diagnostics.Process.Start%2A> method. For example, you should not access the <xref:System.Diagnostics.Process.StartInfo%2A> property on a <xref:System.Diagnostics.Process> object returned by <xref:System.Diagnostics.Process.GetProcesses%2A>. Otherwise, on .NET Core the <xref:System.Diagnostics.Process.StartInfo%2A> property will throw an <xref:System.InvalidOperationException> and on .NET Framework it will return a dummy <xref:System.Diagnostics.ProcessStartInfo> object.
53695369

5370-
When the process is started, the file name is the file that populates the (read-only) <xref:System.Diagnostics.Process.MainModule%2A> property. If you want to retrieve the executable file that is associated with the process after the process has started, use the <xref:System.Diagnostics.Process.MainModule%2A> property. If you want to set the executable file of a <xref:System.Diagnostics.Process> instance for which an associated process has not been started, use the <xref:System.Diagnostics.Process.StartInfo%2A> property's <xref:System.Diagnostics.ProcessStartInfo.FileName%2A> member. Because the members of the <xref:System.Diagnostics.Process.StartInfo%2A> property are arguments that are passed to the <xref:System.Diagnostics.Process.Start%2A> method of a process, changing the <xref:System.Diagnostics.ProcessStartInfo.FileName%2A> property after the associated process has started will not reset the <xref:System.Diagnostics.Process.MainModule%2A> property. These properties are used only to initialize the associated process.
5371-
5372-
5370+
When the process is started, the file name is the file that populates the (read-only) <xref:System.Diagnostics.Process.MainModule%2A> property. If you want to retrieve the executable file that is associated with the process after the process has started, use the <xref:System.Diagnostics.Process.MainModule%2A> property. If you want to set the executable file of a <xref:System.Diagnostics.Process> instance for which an associated process has not been started, use the <xref:System.Diagnostics.Process.StartInfo%2A> property's <xref:System.Diagnostics.ProcessStartInfo.FileName%2A> member. Because the members of the <xref:System.Diagnostics.Process.StartInfo%2A> property are arguments that are passed to the <xref:System.Diagnostics.Process.Start%2A> method of a process, changing the <xref:System.Diagnostics.ProcessStartInfo.FileName%2A> property after the associated process has started will not reset the <xref:System.Diagnostics.Process.MainModule%2A> property. These properties are used only to initialize the associated process.
53735371

53745372
## Examples
53755373
The following example populates a <xref:System.Diagnostics.Process.StartInfo%2A> with the file to execute, the action performed on it and whether it should displays a user interface. For additional examples, refer to the reference pages for properties of the <xref:System.Diagnostics.ProcessStartInfo> class.
@@ -5381,7 +5379,7 @@ The file specified in the <paramref name="fileName" /> could not be found.
53815379
]]></format>
53825380
</remarks>
53835381
<exception cref="T:System.ArgumentNullException">The value that specifies the <see cref="P:System.Diagnostics.Process.StartInfo" /> is <see langword="null" />.</exception>
5384-
<exception cref="T:System.InvalidOperationException">The <see cref="M:System.Diagnostics.Process.Start" /> method was not used to start the process.</exception>
5382+
<exception cref="T:System.InvalidOperationException">.NET Core only: The <see cref="M:System.Diagnostics.Process.Start" /> method was not used to start the process.</exception>
53855383
<altmember cref="M:System.Diagnostics.Process.Start" />
53865384
<altmember cref="P:System.Diagnostics.ProcessStartInfo.FileName" />
53875385
</Docs>

0 commit comments

Comments
 (0)