Index: trunk/extensions/CodeReview/ApiCodeDiff.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | |
20 | 20 | $repo = CodeRepository::newFromName( $params['repo'] ); |
21 | 21 | if( !$repo ){ |
22 | | - throw new MWException( "Invalid repo {$args[0]}" ); |
| 22 | + $this->dieUsage( "Invalid repo '".$params['repo'].'"'); |
23 | 23 | } |
24 | 24 | |
25 | 25 | $svn = SubversionAdaptor::newFromRepo( $repo->getPath() ); |
— | — | @@ -26,8 +26,7 @@ |
27 | 27 | |
28 | 28 | $rev = intval( $params['rev'] ); |
29 | 29 | if( $rev <= 0 || $rev > $lastStoredRev ) { |
30 | | - /// @fixme more sensible error |
31 | | - throw new MWException( 'Invalid input revision' ); |
| 30 | + $this->dieUsage( 'Invalid input revision' ); |
32 | 31 | } |
33 | 32 | |
34 | 33 | $diff = $repo->getDiff( $rev ); |