Skip to content

Commit 1455e5b

Browse files
committed
System.Runtime.ExceptionServices docs
1 parent 499c6d6 commit 1455e5b

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

xml/System.Runtime.ExceptionServices/ExceptionHandling.xml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@
4343
<Parameter Name="exception" Type="System.Object" />
4444
</Parameters>
4545
<Docs>
46-
<param name="exception">To be added.</param>
47-
<summary>To be added.</summary>
48-
<remarks>To be added.</remarks>
46+
<param name="exception">Exception to pass to event handlers.</param>
47+
<summary>Raises the <see cref="E:System.AppDomain.UnhandledException" /> event.</summary>
48+
<remarks>
49+
<para>This method will raise the <see cref="E:System.AppDomain.UnhandledException" /> event and then return.</para>
50+
<para>It will not raise the the handler registered with <see cref="M:System.Runtime.ExceptionServices.ExceptionHandling.SetUnhandledExceptionHandler(System.Func{System.Exception,System.Boolean})" />.</para>
51+
<para>This API is thread safe and can be called from multiple threads. However, only one thread will trigger the event handlers, while other threads will wait indefinitely without raising the event.</para>
52+
</remarks>
4953
</Docs>
5054
</Member>
5155
<Member MemberName="SetUnhandledExceptionHandler">
@@ -68,8 +72,15 @@
6872
</Parameters>
6973
<Docs>
7074
<param name="handler">To be added.</param>
71-
<summary>To be added.</summary>
72-
<remarks>To be added.</remarks>
75+
<summary>Sets a handler for unhandled exceptions.</summary>
76+
<remarks>
77+
<para>The handler will be called when an unhandled exception occurs.</para>
78+
<para>The handler should return <see langword="true" /> if the exception was handled, or <see langword="false" /> if it was not.</para>
79+
<para>If the handler returns <see langword="false" />, the exception will continue to propagate as unhandled.</para>
80+
<para>The intent of this handler is to allow the user to handle unhandled exceptions gracefully when the runtime is being used in certain scenarios. Scenarios such as REPLs or game scripting that host plug-ins are not able to handle unhandled exceptions thrown by those plug-ins.</para>
81+
</remarks>
82+
<exception cref="T:System.ArgumentNullException">If handler is null</exception>
83+
<exception cref="T:System.InvalidOperationException">If a handler is already set</exception>
7384
</Docs>
7485
</Member>
7586
</Members>

0 commit comments

Comments
 (0)