MediaWiki REL1_34
|
Exception used to abort API execution with an error. More...
Public Member Functions | |
__construct (ApiBase $module=null, StatusValue $status, $httpCode=0) | |
__toString () | |
getMessageObject () | |
Return a Message object for this exception.
| |
getModulePath () | |
Fetch the responsible module name. | |
getStatusValue () | |
Fetch the error status. | |
Public Member Functions inherited from MWException | |
getHTML () | |
If $wgShowExceptionDetails is true, return a HTML message with a backtrace to the error, otherwise show a message to ask to set it to true to show that information. | |
getPageTitle () | |
Return the title of the page when reporting this error in a HTTP response. | |
getText () | |
Get the text to display when reporting the error on the command line. | |
isLoggable () | |
Whether to log this exception in the exception debug log. | |
msg ( $key, $fallback,... $params) | |
Get a message from i18n. | |
report () | |
Output a report about the exception and takes care of formatting. | |
reportHTML () | |
Output the exception report using HTML. | |
useMessageCache () | |
Can the extension use the Message class/wfMessage to get i18n-ed messages? | |
useOutputPage () | |
Should the exception use $wgOut to output the error? | |
Static Public Member Functions | |
static | newWithMessage (ApiBase $module=null, $msg, $code=null, $data=null, $httpCode=0) |
Static Public Member Functions inherited from MWException | |
static | isCommandLine () |
Check whether we are in command line mode or not to report the exception in the correct format. | |
Protected Attributes | |
$modulePath | |
$status | |
Private Member Functions | |
getApiMessage () | |
Exception used to abort API execution with an error.
If possible, use ApiBase::dieWithError() instead of throwing this directly.
Definition at line 28 of file ApiUsageException.php.
ApiUsageException::__construct | ( | ApiBase | $module = null, |
StatusValue | $status, | ||
$httpCode = 0 ) |
ApiBase | null | $module | API module responsible for the error, if known |
StatusValue | $status | Status holding errors |
int | $httpCode | HTTP error code to use |
Definition at line 38 of file ApiUsageException.php.
References getApiMessage(), StatusValue\isOK(), and ApiErrorFormatter\stripMarkup().
ApiUsageException::__toString | ( | ) |
Definition at line 115 of file ApiUsageException.php.
References getApiMessage(), and ApiErrorFormatter\stripMarkup().
Referenced by TextExtracts\ApiQueryExtracts\parse().
|
private |
Definition at line 76 of file ApiUsageException.php.
References ApiMessage\create().
Referenced by __construct(), and __toString().
ApiUsageException::getMessageObject | ( | ) |
Return a Message object for this exception.
Implements ILocalizedException.
Definition at line 108 of file ApiUsageException.php.
ApiUsageException::getModulePath | ( | ) |
Fetch the responsible module name.
Definition at line 93 of file ApiUsageException.php.
Referenced by ApiMain\substituteResultWithError().
ApiUsageException::getStatusValue | ( | ) |
Fetch the error status.
Definition at line 101 of file ApiUsageException.php.
Referenced by ApiParamInfo\execute(), ApiMain\handleException(), and TextExtracts\ApiQueryExtracts\parse().
|
static |
ApiBase | null | $module | API module responsible for the error, if known |
string | array | Message | $msg | See ApiMessage::create() |
string | null | $code | See ApiMessage::create() |
array | null | $data | See ApiMessage::create() |
int | $httpCode | HTTP error code to use |
Definition at line 63 of file ApiUsageException.php.
References ApiMessage\create().
|
protected |
Definition at line 30 of file ApiUsageException.php.
|
protected |
Definition at line 31 of file ApiUsageException.php.