r95810 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95809‎ | r95810 | r95811 >
Date:20:45, 30 August 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
Remove wfDie() that Ariel keeps trying to resurrect :)
Modified paths:
  • /trunk/phase3/maintenance/dumpTextPass.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/dumpTextPass.php
@@ -96,7 +96,7 @@
9797 $result = $this->readDump( $input );
9898
9999 if ( WikiError::isError( $result ) ) {
100 - wfDie( $result->getMessage() );
 100+ throw new MWException( $result->getMessage() );
101101 }
102102
103103 if ( $this->spawnProc ) {
@@ -236,12 +236,12 @@
237237 function finalOptionCheck() {
238238 if (($this->checkpointFiles && ! $this->maxTimeAllowed) ||
239239 ($this->maxTimeAllowed && !$this->checkpointFiles)) {
240 - wfDie("Options checkpointfile and maxtime must be specified together.\n");
 240+ throw new MWException("Options checkpointfile and maxtime must be specified together.\n");
241241 }
242242 foreach ($this->checkpointFiles as $checkpointFile) {
243243 $count = substr_count ($checkpointFile,"%s");
244244 if (substr_count ($checkpointFile,"%s") != 2) {
245 - wfDie("Option checkpointfile must contain two '%s' for substitution of first and last pageids, count is $count instead, file is $checkpointFile.\n");
 245+ throw new MWException("Option checkpointfile must contain two '%s' for substitution of first and last pageids, count is $count instead, file is $checkpointFile.\n");
246246 }
247247 }
248248
@@ -251,7 +251,7 @@
252252 $filenameList = array( $filenameList );
253253 }
254254 if (count($filenameList) != count($this->checkpointFiles)) {
255 - wfDie("One checkpointfile must be specified for each output option, if maxtime is used.\n");
 255+ throw new MWException("One checkpointfile must be specified for each output option, if maxtime is used.\n");
256256 }
257257 }
258258 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r96556MFT r95260, r95272, r95288, r95290, r95443, r95601, r95604, r95634, r95720, r...reedy12:28, 8 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95272add support for writing out checkpoint files of xml dump at regular intervals...ariel22:45, 22 August 2011

Comments

#Comment by Hashar (talk | contribs)   08:35, 31 August 2011

Alleluia !

Status & tagging log