Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/164060
Change subject: Add exception handling to SetClaim with log warning ...................................................................... Add exception handling to SetClaim with log warning This can be for the branch only, to allow debugging of bug 71479. Change-Id: Ia604e41c634de36afdfa661a6ca2b81486bff6d4 --- M repo/includes/api/SetClaim.php 1 file changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/60/164060/1 diff --git a/repo/includes/api/SetClaim.php b/repo/includes/api/SetClaim.php index 443b2cc..8148ba8 100644 --- a/repo/includes/api/SetClaim.php +++ b/repo/includes/api/SetClaim.php @@ -79,7 +79,17 @@ $this->claimModificationHelper->applyChangeOp( $changeop, $entity, $summary ); - $this->saveChanges( $entity, $summary ); + try { + $this->saveChanges( $entity, $summary ); + } catch ( \Exception $ex ) { + $entityId = $entity->getId() ? $entityId->getSerialization() : ''; + + wfLogWarning( "Failed to set claim on entity $entityId: " + . var_export( $params, true ) ); + + $this->dieError( 'Failed to save claim.' ); + } + $this->getResultBuilder()->markSuccess(); $this->getResultBuilder()->addClaim( $claim ); } -- To view, visit https://gerrit.wikimedia.org/r/164060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia604e41c634de36afdfa661a6ca2b81486bff6d4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude <aude.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits