Merge "Catch all stash errors in cleanup script"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 4 Nov 2013 17:51:14 +0000 (17:51 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 4 Nov 2013 17:51:14 +0000 (17:51 +0000)
maintenance/cleanupUploadStash.php

index c2ba555..ba7c3cf 100644 (file)
@@ -81,10 +81,9 @@ class UploadStashCleanup extends Maintenance {
                                try {
                                        $stash->getFile( $key, true );
                                        $stash->removeFileNoAuth( $key );
-                               } catch ( UploadStashBadPathException $ex ) {
-                                       $this->output( "Failed removing stashed upload with key: $key\n" );
-                               } catch ( UploadStashZeroLengthFileException $ex ) {
-                                       $this->output( "Failed removing stashed upload with key: $key\n" );
+                               } catch ( UploadStashException $ex ) {
+                                       $type = get_class( $ex );
+                                       $this->output( "Failed removing stashed upload with key: $key ($type)\n" );
                                }
                                if ( $i % 100 == 0 ) {
                                        $this->output( "$i\n" );