make XmlDumpwriter more resilient to blob store corruption
authorAriel T. Glenn <ariel@wikimedia.org>
Wed, 24 Jul 2019 05:56:41 +0000 (08:56 +0300)
committerAriel T. Glenn <ariel@wikimedia.org>
Wed, 24 Jul 2019 05:59:38 +0000 (08:59 +0300)
Loading content can also throw InvalidArgumentException when
the cluster address is an unknown cluster.

Bug: T228720
Change-Id: I313f9a5a27b21a33e90639abae3f505640c30e23

includes/export/XmlDumpWriter.php

index f34b3bd..0003506 100644 (file)
@@ -310,7 +310,8 @@ class XmlDumpWriter {
                } catch ( SuppressedDataException $ex ) {
                        return null;
                } catch ( Exception $ex ) {
-                       if ( $ex instanceof MWException || $ex instanceof RuntimeException ) {
+                       if ( $ex instanceof MWException || $ex instanceof RuntimeException ||
+                               $ex instanceof InvalidArgumentException ) {
                                MWDebug::warning( $warning . ': ' . $ex->getMessage() );
                                return null;
                        } else {