jenkins-bot has submitted this change and it was merged.

Change subject: More infomative errors in wbeditentity
......................................................................


More infomative errors in wbeditentity

Change-Id: Ibd08e6213fb635f5f6223a0810ef0d1c8800ea64
---
M repo/includes/api/EditEntity.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Tobias Gritschacher: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php
index 8035357..98ea065 100644
--- a/repo/includes/api/EditEntity.php
+++ b/repo/includes/api/EditEntity.php
@@ -532,10 +532,10 @@
        public function checkMultilangArgs( $arg, $langCode ) {
                $status = Status::newGood();
                if ( !is_array( $arg ) ) {
-                       $this->dieUsage( 'An array was expected, but not found' 
, 'not-recognized-array' );
+                       $this->dieUsage( "An array was expected, but not found 
in the json for the langCode {$langCode}" , 'not-recognized-array' );
                }
                if ( !is_string( $arg['language'] ) ) {
-                       $this->dieUsage( 'A string was expected, but not found' 
, 'not-recognized-string' );
+                       $this->dieUsage( "A string was expected, but not found 
in the json for the langCode {$langCode} and argument 'language'" , 
'not-recognized-string' );
                }
                if ( !is_numeric( $langCode ) ) {
                        if ( $langCode !== $arg['language'] ) {
@@ -546,7 +546,7 @@
                        $this->dieUsage( "unknown language: 
{$arg['language']}", 'not-recognized-language' );
                }
                if ( !is_string( $arg['value'] ) ) {
-                       $this->dieUsage( 'A string was expected, but not found' 
, 'not-recognized-string' );
+                       $this->dieUsage( "A string was expected, but not found 
in the json for the langCode {$langCode} and argument 'value'" , 
'not-recognized-string' );
                }
                return $status;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/75078
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd08e6213fb635f5f6223a0810ef0d1c8800ea64
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Denny Vrandecic <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to