Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
ShortReadException
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2/**
3 * Exception helper for streaming media segment readers
4 *
5 * @file
6 * @ingroup HLS
7 */
8
9namespace MediaWiki\TimedMediaHandler\HLS;
10
11use Exception;
12
13/**
14 * Exception thrown when asked to read a certain number of bytes.
15 */
16class ShortReadException extends Exception {
17    /**
18     * The read short bytes, if any. May be empty.
19     */
20    public string $bytes;
21
22    /**
23     * @param string $bytes
24     */
25    public function __construct( $bytes ) {
26        $this->bytes = $bytes;
27        parent::__construct( 'Short file read' );
28    }
29}