Index: trunk/phase3/maintenance/dumpTextPass.php |
— | — | @@ -96,7 +96,7 @@ |
97 | 97 | $result = $this->readDump( $input ); |
98 | 98 | |
99 | 99 | if ( WikiError::isError( $result ) ) { |
100 | | - wfDie( $result->getMessage() ); |
| 100 | + throw new MWException( $result->getMessage() ); |
101 | 101 | } |
102 | 102 | |
103 | 103 | if ( $this->spawnProc ) { |
— | — | @@ -236,12 +236,12 @@ |
237 | 237 | function finalOptionCheck() { |
238 | 238 | if (($this->checkpointFiles && ! $this->maxTimeAllowed) || |
239 | 239 | ($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"); |
241 | 241 | } |
242 | 242 | foreach ($this->checkpointFiles as $checkpointFile) { |
243 | 243 | $count = substr_count ($checkpointFile,"%s"); |
244 | 244 | 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"); |
246 | 246 | } |
247 | 247 | } |
248 | 248 | |
— | — | @@ -251,7 +251,7 @@ |
252 | 252 | $filenameList = array( $filenameList ); |
253 | 253 | } |
254 | 254 | 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"); |
256 | 256 | } |
257 | 257 | } |
258 | 258 | } |