summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/StackOverflowException.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/StackOverflowException.cs')
-rw-r--r--src/mscorlib/src/System/StackOverflowException.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/mscorlib/src/System/StackOverflowException.cs b/src/mscorlib/src/System/StackOverflowException.cs
new file mode 100644
index 0000000000..4a20527f61
--- /dev/null
+++ b/src/mscorlib/src/System/StackOverflowException.cs
@@ -0,0 +1,40 @@
+// 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.
+
+/*=============================================================================
+**
+**
+**
+** Purpose: The exception class for stack overflow.
+**
+**
+=============================================================================*/
+
+namespace System {
+
+ using System;
+ using System.Runtime.Serialization;
+ [System.Runtime.InteropServices.ComVisible(true)]
+ [Serializable]
+ public sealed class StackOverflowException : SystemException {
+ public StackOverflowException()
+ : base(Environment.GetResourceString("Arg_StackOverflowException")) {
+ SetErrorCode(__HResults.COR_E_STACKOVERFLOW);
+ }
+
+ public StackOverflowException(String message)
+ : base(message) {
+ SetErrorCode(__HResults.COR_E_STACKOVERFLOW);
+ }
+
+ public StackOverflowException(String message, Exception innerException)
+ : base(message, innerException) {
+ SetErrorCode(__HResults.COR_E_STACKOVERFLOW);
+ }
+
+ internal StackOverflowException(SerializationInfo info, StreamingContext context) : base (info, context) {
+ }
+
+ }
+}