1 // Licensed to the .NET Foundation under one or more agreements. 2 // The .NET Foundation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 /*============================================================================= 6 ** 7 ** 8 ** 9 ** Purpose: The exception class for stack overflow. 10 ** 11 ** 12 =============================================================================*/ 13 14 using System.Runtime.Serialization; 15 16 namespace System 17 { 18 [Serializable] 19 [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] 20 public sealed class StackOverflowException : SystemException 21 { StackOverflowException()22 public StackOverflowException() 23 : base(SR.Arg_StackOverflowException) 24 { 25 HResult = HResults.COR_E_STACKOVERFLOW; 26 } 27 StackOverflowException(String message)28 public StackOverflowException(String message) 29 : base(message) 30 { 31 HResult = HResults.COR_E_STACKOVERFLOW; 32 } 33 StackOverflowException(String message, Exception innerException)34 public StackOverflowException(String message, Exception innerException) 35 : base(message, innerException) 36 { 37 HResult = HResults.COR_E_STACKOVERFLOW; 38 } 39 StackOverflowException(SerializationInfo info, StreamingContext context)40 internal StackOverflowException(SerializationInfo info, StreamingContext context) : base(info, context) 41 { 42 } 43 } 44 } 45