summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Runtime/ExceptionServices
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Runtime/ExceptionServices')
-rw-r--r--src/mscorlib/src/System/Runtime/ExceptionServices/ExceptionNotification.cs41
-rw-r--r--src/mscorlib/src/System/Runtime/ExceptionServices/ExceptionServicesCommon.cs2
2 files changed, 42 insertions, 1 deletions
diff --git a/src/mscorlib/src/System/Runtime/ExceptionServices/ExceptionNotification.cs b/src/mscorlib/src/System/Runtime/ExceptionServices/ExceptionNotification.cs
new file mode 100644
index 0000000000..b084891768
--- /dev/null
+++ b/src/mscorlib/src/System/Runtime/ExceptionServices/ExceptionNotification.cs
@@ -0,0 +1,41 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+/*=============================================================================
+**
+** File: ExceptionNotification.cs
+**
+**
+** Purpose: Contains definitions for supporting Exception Notifications.
+**
+** Created: 10/07/2008
+**
+** <owner>gkhanna</owner>
+**
+=============================================================================*/
+#if FEATURE_EXCEPTION_NOTIFICATIONS
+namespace System.Runtime.ExceptionServices {
+ using System;
+ using System.Runtime.ConstrainedExecution;
+
+ // Definition of the argument-type passed to the FirstChanceException event handler
+ public class FirstChanceExceptionEventArgs : EventArgs
+ {
+ // Constructor
+ public FirstChanceExceptionEventArgs(Exception exception)
+ {
+ m_Exception = exception;
+ }
+
+ // Returns the exception object pertaining to the first chance exception
+ public Exception Exception
+ {
+ [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
+ get { return m_Exception; }
+ }
+
+ // Represents the FirstChance exception instance
+ private Exception m_Exception;
+ }
+}
+#endif // FEATURE_EXCEPTION_NOTIFICATIONS \ No newline at end of file
diff --git a/src/mscorlib/src/System/Runtime/ExceptionServices/ExceptionServicesCommon.cs b/src/mscorlib/src/System/Runtime/ExceptionServices/ExceptionServicesCommon.cs
index 7251d901cd..905f12dfb5 100644
--- a/src/mscorlib/src/System/Runtime/ExceptionServices/ExceptionServicesCommon.cs
+++ b/src/mscorlib/src/System/Runtime/ExceptionServices/ExceptionServicesCommon.cs
@@ -101,7 +101,7 @@ namespace System.Runtime.ExceptionServices {
{
if (source == null)
{
- throw new ArgumentNullException("source", Environment.GetResourceString("ArgumentNull_Obj"));
+ throw new ArgumentNullException(nameof(source), Environment.GetResourceString("ArgumentNull_Obj"));
}
return new ExceptionDispatchInfo(source);