@@ -81,8 +81,8 @@ public OperationFailedException(string? message, Exception? inner)
8181public class BadValueException : OperationFailedException
8282{
8383
84- public BadValueException ( string errorCode , string message )
85- : base ( errorCode , message )
84+ public BadValueException ( string errorCode , string ? errorMessage )
85+ : base ( errorCode , errorMessage )
8686 {
8787 }
8888
@@ -95,8 +95,8 @@ public BadValueException(string errorCode, string message)
9595public class InvalidActionException : BadValueException
9696{
9797
98- public InvalidActionException ( string errorCode , string message )
99- : base ( errorCode , message )
98+ public InvalidActionException ( string errorCode , string ? errorMessage )
99+ : base ( errorCode , errorMessage )
100100 {
101101 }
102102
@@ -113,8 +113,8 @@ public InvalidActionException(string errorCode, string message)
113113public class AccountAssertionFailureException : OperationFailedException
114114{
115115
116- public AccountAssertionFailureException ( string errorCode , string message )
117- : base ( errorCode , message )
116+ public AccountAssertionFailureException ( string errorCode , string ? errorMessage )
117+ : base ( errorCode , errorMessage )
118118 {
119119 }
120120
@@ -195,8 +195,8 @@ public override string ToString()
195195public class OperationConflictException : OperationFailedException
196196{
197197
198- public OperationConflictException ( string errorCode , string message )
199- : base ( errorCode , message )
198+ public OperationConflictException ( string errorCode , string ? errorMessage )
199+ : base ( errorCode , errorMessage )
200200 {
201201 }
202202
@@ -209,8 +209,8 @@ public OperationConflictException(string errorCode, string message)
209209public class BadTokenException : OperationFailedException
210210{
211211
212- public BadTokenException ( string errorCode , string message )
213- : base ( errorCode , message )
212+ public BadTokenException ( string errorCode , string ? errorMessage )
213+ : base ( errorCode , errorMessage )
214214 {
215215 }
216216
@@ -265,15 +265,15 @@ public override string ToString()
265265}
266266
267267/// <summary>
268- /// Raises when MediaWiki server replication lag
269- /// does not meet the required limitation.
270- /// ( <a href="https://www.mediawiki.org/wiki/Manual:Maxlag_parameter">mw:Manual:Maxlag parameter</a>)
268+ /// Raised when MediaWiki server replication lag
269+ /// does not meet the required limitation. (<c>maxlag</c>)
270+ /// See <a href="https://www.mediawiki.org/wiki/Manual:Maxlag_parameter">mw:Manual:Maxlag parameter</a>.
271271/// </summary>
272272public class ServerLagException : OperationFailedException
273273{
274274
275- public ServerLagException ( string errorCode , string message , double lag , string lagType , string laggedHost )
276- : base ( errorCode , message )
275+ public ServerLagException ( string errorCode , string ? errorMessage , double lag , string lagType , string laggedHost )
276+ : base ( errorCode , errorMessage )
277277 {
278278 Lag = lag ;
279279 LaggedHost = laggedHost ;
@@ -300,21 +300,35 @@ public ServerLagException(string errorCode, string message, double lag, string l
300300
301301}
302302
303+ /// <summary>
304+ /// Raised by MediaWiki server when the API operation is too frequent. (<c>ratelimited</c>).
305+ /// </summary>
306+ public class RateLimitedException : OperationFailedException
307+ {
308+
309+ public RateLimitedException ( string errorCode , string ? errorMessage )
310+ : base ( errorCode , errorMessage )
311+ {
312+ }
313+
314+
315+ }
316+
303317/// <summary>
304318/// Raises when the MediaWiki server is in read-only mode.
305319/// </summary>
306320public class MediaWikiReadOnlyException : OperationFailedException
307321{
308322
309- internal static string ? BuildExceptionMessage ( string errorCode , string errorMessage , string ? readOnlyReason )
323+ internal static string ? BuildExceptionMessage ( string errorCode , string ? errorMessage , string ? readOnlyReason )
310324 {
311325 errorMessage ??= "" ;
312326 if ( ! string . IsNullOrEmpty ( readOnlyReason ) && ! errorMessage . Contains ( readOnlyReason , StringComparison . Ordinal ) )
313327 errorMessage += " " + readOnlyReason ;
314328 return BuildExceptionMessage ( errorCode , errorMessage ) ;
315329 }
316330
317- public MediaWikiReadOnlyException ( string errorCode , string errorMessage , string ? readOnlyReason )
331+ public MediaWikiReadOnlyException ( string errorCode , string ? errorMessage , string ? readOnlyReason )
318332 : base ( errorCode , errorMessage , BuildExceptionMessage ( errorCode , errorMessage , readOnlyReason ) )
319333 {
320334 ReadOnlyReason = readOnlyReason ;
0 commit comments