Skip to content

Commit f1f271d

Browse files
authored
Added exceptions that DivRem raises (#12354)
1 parent 9a13441 commit f1f271d

15 files changed

Lines changed: 64 additions & 0 deletions

xml/System.Numerics/BigInteger.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,6 +1716,8 @@ The individual bytes in the `value` array should be in little-endian order, from
17161716
<returns>The quotient and remainder of <paramref name="left" /> divided-by <paramref name="right" />.</returns>
17171717
<remarks>To be added.</remarks>
17181718
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
1719+
<exception cref="T:System.DivideByZeroException">
1720+
<paramref name="right" /> is zero.</exception>
17191721
</Docs>
17201722
</Member>
17211723
<Member MemberName="DivRem">

xml/System.Numerics/IBinaryInteger`1.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@
192192
<summary>Computes the quotient and remainder of two values.</summary>
193193
<returns>The quotient and remainder of <paramref name="left" /> divided by <paramref name="right" />.</returns>
194194
<remarks>To be added.</remarks>
195+
<exception cref="T:System.DivideByZeroException">
196+
<paramref name="right" /> is zero.</exception>
195197
</Docs>
196198
</Member>
197199
<Member MemberName="DivRem">

xml/System/Byte.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,8 @@
710710
<returns>The quotient and remainder of <paramref name="left" /> divided-by <paramref name="right" />.</returns>
711711
<remarks>To be added.</remarks>
712712
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
713+
<exception cref="T:System.DivideByZeroException">
714+
<paramref name="right" /> is zero.</exception>
713715
</Docs>
714716
</Member>
715717
<MemberGroup MemberName="Equals">

xml/System/Int128.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,10 @@
651651
<returns>The quotient and remainder of <paramref name="left" /> divided-by <paramref name="right" />.</returns>
652652
<remarks>To be added.</remarks>
653653
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
654+
<exception cref="T:System.DivideByZeroException">
655+
<paramref name="right" /> is zero.</exception>
656+
<exception cref="T:System.OverflowException">
657+
<paramref name="left" /> is <see cref="F:System.Int128.MinValue">Int128.MinValue</see> and <paramref name="right" /> is -1.</exception>
654658
</Docs>
655659
</Member>
656660
<Member MemberName="Equals">

xml/System/Int16.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,8 @@
791791
<returns>The quotient and remainder of <paramref name="left" /> divided-by <paramref name="right" />.</returns>
792792
<remarks>To be added.</remarks>
793793
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
794+
<exception cref="T:System.DivideByZeroException">
795+
<paramref name="right" /> is zero.</exception>
794796
</Docs>
795797
</Member>
796798
<MemberGroup MemberName="Equals">

xml/System/Int32.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,10 @@
821821
<returns>The quotient and remainder of <paramref name="left" /> divided-by <paramref name="right" />.</returns>
822822
<remarks>To be added.</remarks>
823823
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
824+
<exception cref="T:System.DivideByZeroException">
825+
<paramref name="right" /> is zero.</exception>
826+
<exception cref="T:System.OverflowException">
827+
<paramref name="left" /> is <see cref="F:System.Int32.MinValue">Int32.MinValue</see> and <paramref name="right" /> is -1.</exception>
824828
</Docs>
825829
</Member>
826830
<MemberGroup MemberName="Equals">

xml/System/Int64.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,10 @@
814814
<returns>The quotient and remainder of <paramref name="left" /> divided-by <paramref name="right" />.</returns>
815815
<remarks>To be added.</remarks>
816816
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
817+
<exception cref="T:System.DivideByZeroException">
818+
<paramref name="right" /> is zero.</exception>
819+
<exception cref="T:System.OverflowException">
820+
<paramref name="left" /> is <see cref="F:System.Int64.MinValue">Int64.MinValue</see> and <paramref name="right" /> is -1.</exception>
817821
</Docs>
818822
</Member>
819823
<MemberGroup MemberName="Equals">

xml/System/IntPtr.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,10 @@
10581058
<returns>The quotient and remainder of <paramref name="left" /> divided-by <paramref name="right" />.</returns>
10591059
<remarks>To be added.</remarks>
10601060
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
1061+
<exception cref="T:System.DivideByZeroException">
1062+
<paramref name="right" /> is zero.</exception>
1063+
<exception cref="T:System.OverflowException">
1064+
<paramref name="left" /> is <see cref="F:System.IntPtr.MinValue">IntPtr.MinValue</see> and <paramref name="right" /> is -1.</exception>
10611065
</Docs>
10621066
</Member>
10631067
<Member MemberName="Equals">

xml/System/Math.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2882,6 +2882,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969
28822882
<summary>Produces the quotient and the remainder of two unsigned 8-bit numbers.</summary>
28832883
<returns>The quotient and the remainder of the specified numbers.</returns>
28842884
<remarks>To be added.</remarks>
2885+
<exception cref="T:System.DivideByZeroException">
2886+
<paramref name="right" /> is zero.</exception>
28852887
</Docs>
28862888
</Member>
28872889
<Member MemberName="DivRem">
@@ -2976,6 +2978,10 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969
29762978
<summary>Produces the quotient and the remainder of two signed 32-bit numbers.</summary>
29772979
<returns>The quotient and the remainder of the specified numbers.</returns>
29782980
<remarks>To be added.</remarks>
2981+
<exception cref="T:System.DivideByZeroException">
2982+
<paramref name="right" /> is zero.</exception>
2983+
<exception cref="T:System.OverflowException">
2984+
<paramref name="left" /> is <see cref="F:System.Int32.MinValue">Int32.MinValue</see> and <paramref name="right" /> is -1.</exception>
29792985
</Docs>
29802986
</Member>
29812987
<Member MemberName="DivRem">
@@ -3023,6 +3029,10 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969
30233029
<summary>Produces the quotient and the remainder of two signed 64-bit numbers.</summary>
30243030
<returns>The quotient and the remainder of the specified numbers.</returns>
30253031
<remarks>To be added.</remarks>
3032+
<exception cref="T:System.DivideByZeroException">
3033+
<paramref name="right" /> is zero.</exception>
3034+
<exception cref="T:System.OverflowException">
3035+
<paramref name="left" /> is <see cref="F:System.Int64.MinValue">Int64.MinValue</see> and <paramref name="right" /> is -1.</exception>
30263036
</Docs>
30273037
</Member>
30283038
<Member MemberName="DivRem">
@@ -3085,6 +3095,10 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969
30853095
<summary>Produces the quotient and the remainder of two signed native-size numbers.</summary>
30863096
<returns>The quotient and the remainder of the specified numbers.</returns>
30873097
<remarks>To be added.</remarks>
3098+
<exception cref="T:System.DivideByZeroException">
3099+
<paramref name="right" /> is zero.</exception>
3100+
<exception cref="T:System.OverflowException">
3101+
<paramref name="left" /> is <see cref="F:System.IntPtr.MinValue">IntPtr.MinValue</see> and <paramref name="right" /> is -1.</exception>
30883102
</Docs>
30893103
</Member>
30903104
<Member MemberName="DivRem">
@@ -3138,6 +3152,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969
31383152
<summary>Produces the quotient and the remainder of two signed 8-bit numbers.</summary>
31393153
<returns>The quotient and the remainder of the specified numbers.</returns>
31403154
<remarks>To be added.</remarks>
3155+
<exception cref="T:System.DivideByZeroException">
3156+
<paramref name="right" /> is zero.</exception>
31413157
</Docs>
31423158
</Member>
31433159
<Member MemberName="DivRem">
@@ -3191,6 +3207,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969
31913207
<summary>Produces the quotient and the remainder of two unsigned 16-bit numbers.</summary>
31923208
<returns>The quotient and the remainder of the specified numbers.</returns>
31933209
<remarks>To be added.</remarks>
3210+
<exception cref="T:System.DivideByZeroException">
3211+
<paramref name="right" /> is zero.</exception>
31943212
</Docs>
31953213
</Member>
31963214
<Member MemberName="DivRem">
@@ -3244,6 +3262,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969
32443262
<summary>Produces the quotient and the remainder of two unsigned 32-bit numbers.</summary>
32453263
<returns>The quotient and the remainder of the specified numbers.</returns>
32463264
<remarks>To be added.</remarks>
3265+
<exception cref="T:System.DivideByZeroException">
3266+
<paramref name="right" /> is zero.</exception>
32473267
</Docs>
32483268
</Member>
32493269
<Member MemberName="DivRem">
@@ -3297,6 +3317,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969
32973317
<summary>Produces the quotient and the remainder of two unsigned 64-bit numbers.</summary>
32983318
<returns>The quotient and the remainder of the specified numbers.</returns>
32993319
<remarks>To be added.</remarks>
3320+
<exception cref="T:System.DivideByZeroException">
3321+
<paramref name="right" /> is zero.</exception>
33003322
</Docs>
33013323
</Member>
33023324
<Member MemberName="DivRem">
@@ -3365,6 +3387,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969
33653387
<summary>Produces the quotient and the remainder of two unsigned native-size numbers.</summary>
33663388
<returns>The quotient and the remainder of the specified numbers.</returns>
33673389
<remarks>To be added.</remarks>
3390+
<exception cref="T:System.DivideByZeroException">
3391+
<paramref name="right" /> is zero.</exception>
33683392
</Docs>
33693393
</Member>
33703394
<Member MemberName="DivRem">
@@ -3440,6 +3464,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969
34403464
</remarks>
34413465
<exception cref="T:System.DivideByZeroException">
34423466
<paramref name="b" /> is zero.</exception>
3467+
<exception cref="T:System.OverflowException">
3468+
<paramref name="a" /> is <see cref="F:System.Int32.MinValue">Int32.MinValue</see> and <paramref name="b" /> is -1.</exception>
34433469
<altmember cref="M:System.Math.IEEERemainder(System.Double,System.Double)" />
34443470
</Docs>
34453471
</Member>
@@ -3516,6 +3542,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969
35163542
</remarks>
35173543
<exception cref="T:System.DivideByZeroException">
35183544
<paramref name="b" /> is zero.</exception>
3545+
<exception cref="T:System.OverflowException">
3546+
<paramref name="a" /> is <see cref="F:System.Int64.MinValue">Int64.MinValue</see> and <paramref name="b" /> is -1.</exception>
35193547
<altmember cref="M:System.Math.IEEERemainder(System.Double,System.Double)" />
35203548
</Docs>
35213549
</Member>

xml/System/SByte.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,8 @@
796796
<returns>The quotient and remainder of <paramref name="left" /> divided-by <paramref name="right" />.</returns>
797797
<remarks>To be added.</remarks>
798798
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
799+
<exception cref="T:System.DivideByZeroException">
800+
<paramref name="right" /> is zero.</exception>
799801
</Docs>
800802
</Member>
801803
<MemberGroup MemberName="Equals">

0 commit comments

Comments
 (0)