r114256 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114255‎ | r114256 | r114257 >
Date:11:53, 20 March 2012
Author:qchris
Status:reverted (Comments)
Tags:gerritmigration 
Comment:
Follow up to r114252: Removing asserts
Modified paths:
  • /trunk/phase3/maintenance/dumpTextPass.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/dumpTextPass.php
@@ -87,8 +87,13 @@
8888 $this->lb->closeAll();
8989 unset( $this->lb );
9090 }
91 - assert( '! isset( $this->db ) || ! $this->db->isOpen() /* DB is either unset, or been closed via LB */' );
 91+
 92+ if ( isset( $this->db ) && $this->db->isOpen() )
 93+ {
 94+ throw new MWException( 'DB is set and has not been closed by the Load Balancer' );
 95+ }
9296
 97+
9398 unset( $this->db );
9499
95100 // Trying to set up new connection.
@@ -435,7 +440,6 @@
436441 throw new MWException( "Generic error while obtaining text for id " . $id );
437442 }
438443
439 - assert( '$text !== false' );
440444 // We received a good candidate for the text of $id via some method
441445
442446 // Step 2: Checking for plausibility and return the text if it is
@@ -452,12 +456,9 @@
453457 return $text;
454458 }
455459
456 - assert( 'strlen( $text ) != $revLength /* Obtained text unplausible */' );
457460 $text = false;
458461 throw new MWException( "Received text is unplausible for id " . $id );
459462
460 - assert( 'false /* text is either returned or exception has been thrown */' );
461 -
462463 } catch (Exception $e) {
463464 $msg = "getting/checking text " . $id . " failed (".$e->getMessage().")";
464465 if ( $failures + 1 < $this->maxFailures ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r114257Follow-up to r114256: Removing final assertqchris12:00, 20 March 2012
r114335Revert r107309, r113601, r113704, r113742, r113792, r113838, r113859, r113893......catrope00:16, 21 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r114252Refactoring dumpTextPass's error handlingqchris11:11, 20 March 2012

Comments

#Comment by Nikerabbit (talk | contribs)   07:57, 21 March 2012

Mixes spaces and tabs, not following coding conventions.

Status & tagging log