r41957 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41956‎ | r41957 | r41958 >
Date:01:30, 11 October 2008
Author:aaron
Status:old
Tags:
Comment:
* Use dieUsage()
* Fix bogus var name, should be $params['repo']
Modified paths:
  • /trunk/extensions/CodeReview/ApiCodeDiff.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ApiCodeDiff.php
@@ -18,7 +18,7 @@
1919
2020 $repo = CodeRepository::newFromName( $params['repo'] );
2121 if( !$repo ){
22 - throw new MWException( "Invalid repo {$args[0]}" );
 22+ $this->dieUsage( "Invalid repo '".$params['repo'].'"');
2323 }
2424
2525 $svn = SubversionAdaptor::newFromRepo( $repo->getPath() );
@@ -26,8 +26,7 @@
2727
2828 $rev = intval( $params['rev'] );
2929 if( $rev <= 0 || $rev > $lastStoredRev ) {
30 - /// @fixme more sensible error
31 - throw new MWException( 'Invalid input revision' );
 30+ $this->dieUsage( 'Invalid input revision' );
3231 }
3332
3433 $diff = $repo->getDiff( $rev );

Status & tagging log