Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/242766
Change subject: Do not lose subtype exception info in RevisionBasedEntityLookup ...................................................................... Do not lose subtype exception info in RevisionBasedEntityLookup Change-Id: I5fd0c37e40370b451106d7f05d1efc0abf69609f --- M lib/includes/store/RevisionBasedEntityLookup.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/66/242766/1 diff --git a/lib/includes/store/RevisionBasedEntityLookup.php b/lib/includes/store/RevisionBasedEntityLookup.php index 9008a5d..2dfc282 100644 --- a/lib/includes/store/RevisionBasedEntityLookup.php +++ b/lib/includes/store/RevisionBasedEntityLookup.php @@ -42,6 +42,8 @@ public function getEntity( EntityId $entityId ) { try { $revision = $this->lookup->getEntityRevision( $entityId ); + } catch ( EntityLookupException $ex ) { + throw $ex; } catch ( \Exception $ex ) { // TODO: catch more specific exception once EntityRevisionLookup contract gets clarified throw new EntityLookupException( $entityId, null, $ex ); @@ -61,6 +63,8 @@ public function hasEntity( EntityId $entityId ) { try { return $this->lookup->getLatestRevisionId( $entityId ) !== false; + } catch ( EntityLookupException $ex ) { + throw $ex; } catch ( \Exception $ex ) { // TODO: catch more specific exception once EntityRevisionLookup contract gets clarified throw new EntityLookupException( $entityId, null, $ex ); -- To view, visit https://gerrit.wikimedia.org/r/242766 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5fd0c37e40370b451106d7f05d1efc0abf69609f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits