Class MaxlagErrorException

All Implemented Interfaces:
Serializable

public class MaxlagErrorException extends MediaWikiApiErrorException
Exception to indicate a MediaWiki API error caused by exceeding the maxlag parameter. See MediaWiki documentation.
Author:
Markus Kroetzsch
See Also:
  • Field Details

    • lag

      protected double lag
  • Constructor Details

    • MaxlagErrorException

      public MaxlagErrorException(String errorMessage)
      Creates a new exception.
      Parameters:
      errorMessage - the error message reported by MediaWiki, or any other meaningful message for the user
    • MaxlagErrorException

      public MaxlagErrorException(String errorMessage, double lag)
      Creates an exception which also stores the lag announced by the server.
      Parameters:
      errorMessage - the error message reported by MediaWiki, or any other meaningful message for the user
      lag - the value of the reported lag, in seconds
  • Method Details

    • getLag

      public double getLag()
      Retrieves the amount of lag announced by the server when this error was emitted. May return 0 if the lag was not extracted from the server response.
      Returns:
      the lag on the target server