[MediaWiki-commits] [Gerrit] Don't fatal in RdfDumpGenerator if entity loading failed - change (mediawiki...Wikibase)

2015-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't fatal in RdfDumpGenerator if entity loading failed
..


Don't fatal in RdfDumpGenerator if entity loading failed

The parent class will catch the exception and handle it. See
also the implementation in JsonDumpGenerator.

Fails for testwikidatawiki with:
Fatal error: Call to a member function getEntity() on a non-object in 
/srv/mediawiki/php-1.26wmf6/extensions/Wikidata/extensions/Wikibase/repo/includes/Dumpers/RdfDumpGenerator.php
 on line 102

Change-Id: I6d6fcb4b3330a3e5a019f29c185e5585afb0fe74
---
M repo/includes/Dumpers/RdfDumpGenerator.php
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/repo/includes/Dumpers/RdfDumpGenerator.php 
b/repo/includes/Dumpers/RdfDumpGenerator.php
index c44c9e7..5305eb6 100644
--- a/repo/includes/Dumpers/RdfDumpGenerator.php
+++ b/repo/includes/Dumpers/RdfDumpGenerator.php
@@ -98,6 +98,10 @@
try {
$entityRevision = 
$this->entityRevisionLookup->getEntityRevision( $entityId );
 
+   if ( !$entityRevision ) {
+   throw new StorageException( 'Entity not found: 
' . $entityId->getSerialization() );
+   }
+
$this->rdfBuilder->addEntityRevisionInfo(
$entityRevision->getEntity()->getId(),
$entityRevision->getRevisionId(),
@@ -108,9 +112,6 @@
$entityRevision->getEntity()
);
 
-   if ( !$entityRevision ) {
-   throw new StorageException( 'Entity not found: 
' . $entityId->getSerialization() );
-   }
} catch ( MWContentSerializationException $ex ) {
throw new StorageException( 'Deserialization error for 
' . $entityId->getSerialization() );
} catch ( UnresolvedRedirectException $e ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d6fcb4b3330a3e5a019f29c185e5585afb0fe74
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.26wmf6
Gerrit-Owner: JanZerebecki 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Don't fatal in RdfDumpGenerator if entity loading failed - change (mediawiki...Wikibase)

2015-05-16 Thread JanZerebecki (Code Review)
JanZerebecki has uploaded a new change for review.

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

Change subject: Don't fatal in RdfDumpGenerator if entity loading failed
..

Don't fatal in RdfDumpGenerator if entity loading failed

The parent class will catch the exception and handle it. See
also the implementation in JsonDumpGenerator.

Fails for testwikidatawiki with:
Fatal error: Call to a member function getEntity() on a non-object in 
/srv/mediawiki/php-1.26wmf6/extensions/Wikidata/extensions/Wikibase/repo/includes/Dumpers/RdfDumpGenerator.php
 on line 102

Change-Id: I6d6fcb4b3330a3e5a019f29c185e5585afb0fe74
---
M repo/includes/Dumpers/RdfDumpGenerator.php
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/repo/includes/Dumpers/RdfDumpGenerator.php 
b/repo/includes/Dumpers/RdfDumpGenerator.php
index c44c9e7..5305eb6 100644
--- a/repo/includes/Dumpers/RdfDumpGenerator.php
+++ b/repo/includes/Dumpers/RdfDumpGenerator.php
@@ -98,6 +98,10 @@
try {
$entityRevision = 
$this->entityRevisionLookup->getEntityRevision( $entityId );
 
+   if ( !$entityRevision ) {
+   throw new StorageException( 'Entity not found: 
' . $entityId->getSerialization() );
+   }
+
$this->rdfBuilder->addEntityRevisionInfo(
$entityRevision->getEntity()->getId(),
$entityRevision->getRevisionId(),
@@ -108,9 +112,6 @@
$entityRevision->getEntity()
);
 
-   if ( !$entityRevision ) {
-   throw new StorageException( 'Entity not found: 
' . $entityId->getSerialization() );
-   }
} catch ( MWContentSerializationException $ex ) {
throw new StorageException( 'Deserialization error for 
' . $entityId->getSerialization() );
} catch ( UnresolvedRedirectException $e ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d6fcb4b3330a3e5a019f29c185e5585afb0fe74
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.26wmf6
Gerrit-Owner: JanZerebecki 
Gerrit-Reviewer: Hoo man 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Don't fatal in RdfDumpGenerator if entity loading failed - change (mediawiki...Wikibase)

2015-05-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't fatal in RdfDumpGenerator if entity loading failed
..


Don't fatal in RdfDumpGenerator if entity loading failed

The parent class will catch the exception and handle it. See
also the implementation in JsonDumpGenerator.

Fails for testwikidatawiki with:
Fatal error: Call to a member function getEntity() on a non-object in 
/srv/mediawiki/php-1.26wmf6/extensions/Wikidata/extensions/Wikibase/repo/includes/Dumpers/RdfDumpGenerator.php
 on line 102

Change-Id: I6d6fcb4b3330a3e5a019f29c185e5585afb0fe74
---
M repo/includes/Dumpers/RdfDumpGenerator.php
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/repo/includes/Dumpers/RdfDumpGenerator.php 
b/repo/includes/Dumpers/RdfDumpGenerator.php
index c44c9e7..5305eb6 100644
--- a/repo/includes/Dumpers/RdfDumpGenerator.php
+++ b/repo/includes/Dumpers/RdfDumpGenerator.php
@@ -98,6 +98,10 @@
try {
$entityRevision = 
$this->entityRevisionLookup->getEntityRevision( $entityId );
 
+   if ( !$entityRevision ) {
+   throw new StorageException( 'Entity not found: 
' . $entityId->getSerialization() );
+   }
+
$this->rdfBuilder->addEntityRevisionInfo(
$entityRevision->getEntity()->getId(),
$entityRevision->getRevisionId(),
@@ -108,9 +112,6 @@
$entityRevision->getEntity()
);
 
-   if ( !$entityRevision ) {
-   throw new StorageException( 'Entity not found: 
' . $entityId->getSerialization() );
-   }
} catch ( MWContentSerializationException $ex ) {
throw new StorageException( 'Deserialization error for 
' . $entityId->getSerialization() );
} catch ( UnresolvedRedirectException $e ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d6fcb4b3330a3e5a019f29c185e5585afb0fe74
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Don't fatal in RdfDumpGenerator if entity loading failed - change (mediawiki...Wikibase)

2015-05-16 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Don't fatal in RdfDumpGenerator if entity loading failed
..

Don't fatal in RdfDumpGenerator if entity loading failed

The parent class will catch the exception and handle it. See
also the implementation in JsonDumpGenerator.

Fails for testwikidatawiki with:
Fatal error: Call to a member function getEntity() on a non-object in 
/srv/mediawiki/php-1.26wmf6/extensions/Wikidata/extensions/Wikibase/repo/includes/Dumpers/RdfDumpGenerator.php
 on line 102

Change-Id: I6d6fcb4b3330a3e5a019f29c185e5585afb0fe74
---
M repo/includes/Dumpers/RdfDumpGenerator.php
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/repo/includes/Dumpers/RdfDumpGenerator.php 
b/repo/includes/Dumpers/RdfDumpGenerator.php
index c44c9e7..5305eb6 100644
--- a/repo/includes/Dumpers/RdfDumpGenerator.php
+++ b/repo/includes/Dumpers/RdfDumpGenerator.php
@@ -98,6 +98,10 @@
try {
$entityRevision = 
$this->entityRevisionLookup->getEntityRevision( $entityId );
 
+   if ( !$entityRevision ) {
+   throw new StorageException( 'Entity not found: 
' . $entityId->getSerialization() );
+   }
+
$this->rdfBuilder->addEntityRevisionInfo(
$entityRevision->getEntity()->getId(),
$entityRevision->getRevisionId(),
@@ -108,9 +112,6 @@
$entityRevision->getEntity()
);
 
-   if ( !$entityRevision ) {
-   throw new StorageException( 'Entity not found: 
' . $entityId->getSerialization() );
-   }
} catch ( MWContentSerializationException $ex ) {
throw new StorageException( 'Deserialization error for 
' . $entityId->getSerialization() );
} catch ( UnresolvedRedirectException $e ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d6fcb4b3330a3e5a019f29c185e5585afb0fe74
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits