|
44 | 44 | <format type="text/markdown"><. |
| 51 | +
|
| 52 | +<xref:System.Runtime.ExceptionServices.ExceptionDispatchInfo> cannot be serialized and is not intended to cross application domain boundaries. |
| 53 | +
|
51 | 54 | ]]></format>
|
52 | 55 | </remarks>
|
| 56 | + <related type="Article" href="/dotnet/standard/exceptions/best-practices-for-exceptions#capture-exceptions-to-rethrow-later">Capture exceptions to rethrow later</related> |
53 | 57 | </Docs>
|
54 | 58 | <Members>
|
55 | 59 | <Member MemberName="Capture">
|
|
97 | 101 | <format type="text/markdown"><![CDATA[
|
98 | 102 |
|
99 | 103 | ## Remarks
|
100 |
| - You can use the <xref:System.Runtime.ExceptionServices.ExceptionDispatchInfo> object that is returned by this method at another time and possibly on another thread to rethrow the specified exception, as if the exception had flowed from this point where it was captured to the point where it is rethrown. |
| 104 | + You can use the <xref:System.Runtime.ExceptionServices.ExceptionDispatchInfo> object that's returned by this method at another time and possibly on another thread to rethrow the specified exception, as if the exception had flowed from the point where it was captured to the point where it's rethrown. |
101 | 105 |
|
102 |
| - If the exception is active when it is captured, the current stack trace information and Watson information that is contained in the exception is stored. If it is inactive, that is, if it has not been thrown, it will not have any stack trace information or Watson information. |
| 106 | + If the exception is active when it's captured, the current stack trace information and Watson information that's contained in the exception is stored. If it's inactive, that is, if it has not been thrown, it doesn't have any stack trace or Watson information. |
103 | 107 |
|
104 | 108 | ]]></format>
|
105 | 109 | </remarks>
|
106 | 110 | <exception cref="T:System.ArgumentException">
|
107 | 111 | <paramref name="source" /> is <see langword="null" />.</exception>
|
| 112 | + <related type="Article" href="/dotnet/standard/exceptions/best-practices-for-exceptions#capture-exceptions-to-rethrow-later">Capture exceptions to rethrow later</related> |
108 | 113 | </Docs>
|
109 | 114 | </Member>
|
110 | 115 | <Member MemberName="SetCurrentStackTrace">
|
|
169 | 174 | <Parameter Name="stackTrace" Type="System.String" Index="1" FrameworkAlternate="net-6.0;net-7.0" />
|
170 | 175 | </Parameters>
|
171 | 176 | <Docs>
|
172 |
| - <param name="source">The unthrown <see cref="T:System.Exception" /> instance.</param> |
173 |
| - <param name="stackTrace">The stack trace string to persist within <paramref name="source" />. This is normally acquired from the <see cref="P:System.Exception.StackTrace" /> property from the remote exception instance.</param> |
| 177 | + <param name="source">The unthrown exception.</param> |
| 178 | + <param name="stackTrace">The stack trace string to persist within <paramref name="source" />. This is normally acquired from the <see cref="P:System.Exception.StackTrace" /> property of the remote exception instance.</param> |
174 | 179 | <summary>Stores the provided stack trace into the specified <see cref="T:System.Exception" /> instance.</summary>
|
175 | 180 | <returns>The <paramref name="source" /> exception instance.</returns>
|
176 | 181 | <remarks>
|
177 | 182 | <format type="text/markdown"><![CDATA[
|
178 | 183 |
|
179 | 184 | ## Remarks
|
180 | 185 |
|
181 |
| -This method populates the <xref:System.Exception.StackTrace> property from an arbitrary string value. |
182 |
| - The typical use case is the transmission of <xref:System.Exception> objects across processes with high fidelity, |
183 |
| - allowing preservation of the exception object's stack trace information. .NET does not attempt to parse the |
184 |
| - provided string value. |
| 186 | +This method populates the <xref:System.Exception.StackTrace> property from an arbitrary string value. The typical use case is the transmission of <xref:System.Exception> objects across processes with high fidelity, allowing preservation of the exception object's stack trace information. .NET does not attempt to parse the provided string value. |
185 | 187 |
|
186 |
| -The caller is responsible for canonicalizing line endings if required. <xref:System.String.ReplaceLineEndings> |
187 |
| - can be used to canonicalize line endings. |
| 188 | +The caller is responsible for canonicalizing line endings if required. <xref:System.String.ReplaceLineEndings> can be used to canonicalize line endings. |
188 | 189 |
|
189 |
| -If the caller provides untrusted input to this API, this may result in the exception's stack trace containing |
190 |
| - embedded null characters, reserved HTML or JSON characters, or other unexpected values. Applications that |
191 |
| - display an exception's details to the user should always take care to encode the exception information at the |
192 |
| - point where it is displayed. |
| 190 | +If the caller provides untrusted input to this API, this may result in the exception's stack trace containing embedded null characters, reserved HTML or JSON characters, or other unexpected values. Applications that display an exception's details to the user should always take care to encode the exception information at the point where it's displayed. |
193 | 191 |
|
194 | 192 | ]]></format>
|
195 | 193 | </remarks>
|
@@ -232,13 +230,13 @@ If the caller provides untrusted input to this API, this may result in the excep
|
232 | 230 | <ReturnType>System.Exception</ReturnType>
|
233 | 231 | </ReturnValue>
|
234 | 232 | <Docs>
|
235 |
| - <summary>Gets the exception that is represented by the current instance.</summary> |
236 |
| - <value>The exception that is represented by the current instance.</value> |
| 233 | + <summary>Gets the exception that's represented by the current instance.</summary> |
| 234 | + <value>The exception that's represented by the current instance.</value> |
237 | 235 | <remarks>
|
238 | 236 | <format type="text/markdown"><![CDATA[
|
239 | 237 |
|
240 | 238 | ## Remarks
|
241 |
| - This property is used by the Task Parallel Library, for example, to combine multiple exceptions in an <xref:System.AggregateException> object. It is not intended to be used by application code. Use the <xref:System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw%2A> method to restore the state of the captured exception and throw it. |
| 239 | + This property is used by the Task Parallel Library, for example, to combine multiple exceptions in an <xref:System.AggregateException> object. It's not intended to be used by application code. Use the <xref:System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw%2A> method to restore the state of the captured exception and throw it. |
242 | 240 |
|
243 | 241 | ]]></format>
|
244 | 242 | </remarks>
|
@@ -286,12 +284,12 @@ If the caller provides untrusted input to this API, this may result in the excep
|
286 | 284 | </ReturnValue>
|
287 | 285 | <Parameters />
|
288 | 286 | <Docs>
|
289 |
| - <summary>Throws the exception that is represented by the current <see cref="T:System.Runtime.ExceptionServices.ExceptionDispatchInfo" /> object, after restoring the state that was saved when the exception was captured.</summary> |
| 287 | + <summary>Throws the exception that's represented by the current <see cref="T:System.Runtime.ExceptionServices.ExceptionDispatchInfo" /> object, after restoring the state that was saved when the exception was captured.</summary> |
290 | 288 | <remarks>
|
291 | 289 | <format type="text/markdown"><![CDATA[
|
292 | 290 |
|
293 | 291 | ## Remarks
|
294 |
| - When the exception is restored, the following string is inserted in the stack trace to indicate the restore point: "End of stack trace from the previous location where the exception was thrown". This is similar to the way inner exceptions or marshaled exceptions are indicated in stack traces. |
| 292 | + When the exception is restored, the following string is inserted in the stack trace to indicate the restore point: `"End of stack trace from the previous location where the exception was thrown"`. This is similar to the way inner exceptions or marshaled exceptions are indicated in stack traces. |
295 | 293 |
|
296 | 294 | ]]></format>
|
297 | 295 | </remarks>
|
|
0 commit comments