Addshore has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/75078


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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/78/75078/1

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: newchange
Gerrit-Change-Id: Ibd08e6213fb635f5f6223a0810ef0d1c8800ea64
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>

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

Reply via email to