Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| ScoreBackendException | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\Score; |
| 4 | |
| 5 | use MediaWiki\Status\Status; |
| 6 | use StatusValue; |
| 7 | |
| 8 | /** |
| 9 | * Convenient wrapper for score-backend-error |
| 10 | */ |
| 11 | class ScoreBackendException extends ScoreException { |
| 12 | /** |
| 13 | * @param StatusValue $sv Status to be passed as $1 to the exception message |
| 14 | */ |
| 15 | public function __construct( StatusValue $sv ) { |
| 16 | parent::__construct( 'score-backend-error', [ Status::wrap( $sv )->getWikitext() ] ); |
| 17 | } |
| 18 | } |