Class MediaWikiApiErrorHandler
java.lang.Object
org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorHandler
Class to interpret MediaWiki API errors.
- Author:
- Markus Kroetzsch
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
throwMediaWikiApiErrorException
(String errorCode, String errorMessage) Creates and throws a suitableMediaWikiApiErrorException
for the given error code and message.
-
Field Details
-
ERROR_EDIT_CONFLICT
- See Also:
-
ERROR_NO_TOKEN
- See Also:
-
ERROR_INVALID_TOKEN
- See Also:
-
ERROR_NO_SUCH_ENTITY
- See Also:
-
ERROR_MAXLAG
- See Also:
-
ERROR_ASSERT_USER_FAILED
- See Also:
-
ERROR_TAGS_APPLY_NOT_ALLOWED
- See Also:
-
-
Constructor Details
-
MediaWikiApiErrorHandler
public MediaWikiApiErrorHandler()
-
-
Method Details
-
throwMediaWikiApiErrorException
public static void throwMediaWikiApiErrorException(String errorCode, String errorMessage) throws MediaWikiApiErrorException Creates and throws a suitableMediaWikiApiErrorException
for the given error code and message.- Parameters:
errorCode
- the error code reported by MediaWikierrorMessage
- the error message reported by MediaWiki, or any other meaningful message for the user- Throws:
MediaWikiApiErrorException
- in all cases, but may throw a subclass for some errors
-