@@ -8,84 +8,89 @@ type Attribute() = class end
88
99type Enum () = class end
1010
11- type Exception ( message : string ) =
12- new () = Exception( " " )
11+ [<AllowNullLiteral>]
12+ type Exception ( message : string , innerException : Exception ) =
13+ new () = Exception( " " , null )
14+ new ( message) = Exception( message, null )
1315 member _.Message = message
1416 member _.StackTrace = " "
17+ member _.InnerException = innerException
1518
1619 interface System.Collections.IStructuralEquatable with
1720 member x.Equals ( y , comparer ) = false
1821 member x.GetHashCode ( comparer ) = 0
1922
2023type SystemException ( message : string ) =
21- inherit Exception( message)
24+ inherit Exception( message, null )
2225 new () = SystemException( SR.Arg_ SystemException)
2326
2427type ApplicationException ( message : string ) =
25- inherit Exception( message)
28+ inherit Exception( message, null )
2629 new () = ApplicationException( SR.Arg_ ApplicationException)
2730
2831type ArithmeticException ( message : string ) =
29- inherit Exception( message)
32+ inherit Exception( message, null )
3033 new () = ArithmeticException( SR.Arg_ ArithmeticException)
3134
3235type DivideByZeroException ( message : string ) =
33- inherit Exception( message)
36+ inherit Exception( message, null )
3437 new () = DivideByZeroException( SR.Arg_ DivideByZero)
3538
3639type FormatException ( message : string ) =
37- inherit Exception( message)
40+ inherit Exception( message, null )
3841 new () = FormatException( SR.Arg_ FormatException)
3942
4043type IndexOutOfRangeException ( message : string ) =
41- inherit Exception( message)
44+ inherit Exception( message, null )
4245 new () = IndexOutOfRangeException( SR.Arg_ IndexOutOfRangeException)
4346
4447type InvalidOperationException ( message : string ) =
45- inherit Exception( message)
48+ inherit Exception( message, null )
4649 new () = InvalidOperationException( SR.Arg_ InvalidOperationException)
4750
4851type NotFiniteNumberException ( message : string ) =
49- inherit Exception( message)
52+ inherit Exception( message, null )
5053 new () = NotFiniteNumberException( SR.Arg_ NotFiniteNumberException)
5154
5255type NotImplementedException ( message : string ) =
53- inherit Exception( message)
56+ inherit Exception( message, null )
5457 new () = NotImplementedException( SR.Arg_ NotImplementedException)
5558
5659type NotSupportedException ( message : string ) =
57- inherit Exception( message)
60+ inherit Exception( message, null )
5861 new () = NotSupportedException( SR.Arg_ NotSupportedException)
5962
6063type NullReferenceException ( message : string ) =
61- inherit Exception( message)
64+ inherit Exception( message, null )
6265 new () = NullReferenceException( SR.Arg_ NullReferenceException)
6366
6467type OutOfMemoryException ( message : string ) =
65- inherit Exception( message)
68+ inherit Exception( message, null )
6669 new () = OutOfMemoryException( SR.Arg_ OutOfMemoryException)
6770
6871type OverflowException ( message : string ) =
69- inherit Exception( message)
72+ inherit Exception( message, null )
7073 new () = OverflowException( SR.Arg_ OverflowException)
7174
7275type RankException ( message : string ) =
73- inherit Exception( message)
76+ inherit Exception( message, null )
7477 new () = RankException( SR.Arg_ RankException)
7578
7679type StackOverflowException ( message : string ) =
77- inherit Exception( message)
80+ inherit Exception( message, null )
7881 new () = StackOverflowException( SR.Arg_ StackOverflowException)
7982
8083type TimeoutException ( message : string ) =
81- inherit Exception( message)
84+ inherit Exception( message, null )
8285 new () = TimeoutException( SR.Arg_ TimeoutException)
8386
84- type ArgumentException ( message : string , paramName : string ) =
85- inherit Exception( message)
87+ type ArgumentException ( message : string , paramName : string , innerException : Exception ) =
88+ inherit Exception( message, innerException )
8689
87- new () = ArgumentException( SR.Arg_ ArgumentException, " " )
88- new ( message) = ArgumentException( message, " " )
90+ new () = ArgumentException( SR.Arg_ ArgumentException, " " , null )
91+ new ( message) = ArgumentException( message, " " , null )
92+ new ( message: string, paramName: string) = ArgumentException( message, paramName, null )
93+ new ( message: string, innerException: Exception) = ArgumentException( message, " " , innerException)
8994
9095 member _.Message =
9196 if System.String.IsNullOrEmpty( paramName) then
@@ -96,12 +101,12 @@ type ArgumentException(message: string, paramName: string) =
96101 member _.ParamName = paramName
97102
98103type ArgumentNullException ( paramName : string , message : string ) =
99- inherit ArgumentException( message, paramName)
104+ inherit ArgumentException( message, paramName, null )
100105 new ( paramName) = ArgumentNullException( paramName, SR.ArgumentNull_ Generic)
101106 new () = ArgumentNullException( " " )
102107
103108type ArgumentOutOfRangeException ( paramName : string , message : string ) =
104- inherit ArgumentException( message, paramName)
109+ inherit ArgumentException( message, paramName, null )
105110 new ( paramName) = ArgumentOutOfRangeException( paramName, SR.Arg_ ArgumentOutOfRangeException)
106111 new () = ArgumentOutOfRangeException( " " )
107112
0 commit comments