diff options
author | Bryan Davis <bd808@wikimedia.org> | 2017-11-19 17:36:54 -0700 |
---|---|---|
committer | Bryan Davis <bd808@wikimedia.org> | 2017-11-21 21:34:16 -0700 |
commit | 9e34eeff23fdd46a8e9bddfbab39d45eab232827 (patch) | |
tree | 8bc5d4bdd2efc8ce68d2c605f10f1bfa7d88de3a /maintenance/refreshImageMetadata.php | |
parent | 708e8e9dee4523997a2dfe73e312db18725e782b (diff) | |
download | mediawikicore-9e34eeff23fdd46a8e9bddfbab39d45eab232827.tar.gz mediawikicore-9e34eeff23fdd46a8e9bddfbab39d45eab232827.zip |
Maintenance: add fatalError() method
Deprecate the second argument to Maintenance::error() in favor of a new
Maintenance::fatalError() method. This is intended to make it easier to
review flow control in maintenance scripts.
Change-Id: I75699008638f7e99b11210c7bb9e2e131fca7c9e
Diffstat (limited to 'maintenance/refreshImageMetadata.php')
-rw-r--r-- | maintenance/refreshImageMetadata.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/maintenance/refreshImageMetadata.php b/maintenance/refreshImageMetadata.php index f6c0673b10be..dcfed115d030 100644 --- a/maintenance/refreshImageMetadata.php +++ b/maintenance/refreshImageMetadata.php @@ -108,7 +108,7 @@ class RefreshImageMetadata extends Maintenance { $dbw = $this->getDB( DB_MASTER ); $batchSize = $this->getBatchSize(); if ( $batchSize <= 0 ) { - $this->error( "Batch size is too low...", 12 ); + $this->fatalError( "Batch size is too low...", 12 ); } $repo = RepoGroup::singleton()->getLocalRepo(); @@ -255,7 +255,7 @@ class RefreshImageMetadata extends Maintenance { } if ( $brokenOnly && $force ) { - $this->error( 'Cannot use --broken-only and --force together. ', 2 ); + $this->fatalError( 'Cannot use --broken-only and --force together. ', 2 ); } } } |