Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| ZipDirectoryReaderError | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getErrorCode | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * @license GPL-2.0-or-later |
| 4 | * @file |
| 5 | */ |
| 6 | |
| 7 | namespace Wikimedia\Mime; |
| 8 | |
| 9 | use Exception; |
| 10 | |
| 11 | /** |
| 12 | * Internal exception class. Will be caught by private code. |
| 13 | * |
| 14 | * @newable |
| 15 | */ |
| 16 | class ZipDirectoryReaderError extends Exception { |
| 17 | /** @var string */ |
| 18 | protected $errorCode; |
| 19 | |
| 20 | /** |
| 21 | * @stable to call |
| 22 | * |
| 23 | * @param string $code |
| 24 | */ |
| 25 | public function __construct( $code ) { |
| 26 | $this->errorCode = $code; |
| 27 | parent::__construct( "ZipDirectoryReader error: $code" ); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * @return string |
| 32 | */ |
| 33 | public function getErrorCode() { |
| 34 | return $this->errorCode; |
| 35 | } |
| 36 | } |