$this->mCodestr = $codestr;
$this->mExtraData = $extradata;
+ if ( !$this instanceof ApiUsageException ) {
+ wfDeprecated( __METHOD__, '1.29' );
+ }
+
// This should never happen, so throw an exception about it that will
// hopefully get logged with a backtrace (T138585)
if ( !is_string( $codestr ) || $codestr === '' ) {
* @return string
*/
public function getCodeString() {
+ wfDeprecated( __METHOD__, '1.29' );
return $this->mCodestr;
}
* @return array
*/
public function getMessageArray() {
+ wfDeprecated( __METHOD__, '1.29' );
$result = [
'code' => $this->mCodestr,
'info' => $this->getMessage()
/**
* @deprecated Do not use. This only exists here because UsageException is in
* the inheritance chain for backwards compatibility.
- * @inheritdoc
+ * @inheritDoc
*/
public function getCodeString() {
+ wfDeprecated( __METHOD__, '1.29' );
return $this->getApiMessage()->getApiCode();
}
/**
* @deprecated Do not use. This only exists here because UsageException is in
* the inheritance chain for backwards compatibility.
- * @inheritdoc
+ * @inheritDoc
*/
public function getMessageArray() {
+ wfDeprecated( __METHOD__, '1.29' );
$enMsg = clone $this->getApiMessage();
$enMsg->inLanguage( 'en' )->useDatabase( false );
}
/**
- * @inheritdoc
+ * @inheritDoc
*/
public function getMessageObject() {
return $this->status->getMessage();