public class MediaWikiApiErrorHandler extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_ASSERT_USER_FAILED |
static String |
ERROR_EDIT_CONFLICT |
static String |
ERROR_INVALID_TOKEN |
static String |
ERROR_MAXLAG |
static String |
ERROR_NO_SUCH_ENTITY |
static String |
ERROR_NO_TOKEN |
static String |
ERROR_TAGS_APPLY_NOT_ALLOWED |
Constructor and Description |
---|
MediaWikiApiErrorHandler() |
Modifier and Type | Method and Description |
---|---|
static void |
throwMediaWikiApiErrorException(String errorCode,
String errorMessage)
Creates and throws a suitable
MediaWikiApiErrorException for the
given error code and message. |
public static final String ERROR_EDIT_CONFLICT
public static final String ERROR_NO_TOKEN
public static final String ERROR_INVALID_TOKEN
public static final String ERROR_NO_SUCH_ENTITY
public static final String ERROR_MAXLAG
public static final String ERROR_ASSERT_USER_FAILED
public static final String ERROR_TAGS_APPLY_NOT_ALLOWED
public static void throwMediaWikiApiErrorException(String errorCode, String errorMessage) throws MediaWikiApiErrorException
MediaWikiApiErrorException
for the
given error code and message.errorCode
- the error code reported by MediaWikierrorMessage
- the error message reported by MediaWiki, or any other
meaningful message for the userMediaWikiApiErrorException
- in all cases, but may throw a subclass for some errorsCopyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage