2019-02-06 21:22:01 +00:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
|
*
|
|
|
|
|
* @file
|
|
|
|
|
* @ingroup Upload
|
|
|
|
|
*/
|
|
|
|
|
|
2024-09-01 18:20:46 +00:00
|
|
|
use MediaWiki\Message\Message;
|
|
|
|
|
|
2020-06-29 12:13:29 +00:00
|
|
|
/**
|
|
|
|
|
* @newable
|
|
|
|
|
*/
|
2023-12-14 13:19:40 +00:00
|
|
|
class UploadChunkVerificationException extends RuntimeException {
|
2024-09-01 18:20:46 +00:00
|
|
|
/** @var Message */
|
2019-02-06 21:22:01 +00:00
|
|
|
public $msg;
|
2019-05-11 01:17:43 +00:00
|
|
|
|
2022-10-08 13:07:46 +00:00
|
|
|
/**
|
|
|
|
|
* @param array $res
|
|
|
|
|
* @phan-param non-empty-array $res
|
|
|
|
|
*/
|
2019-02-06 21:22:01 +00:00
|
|
|
public function __construct( array $res ) {
|
|
|
|
|
$this->msg = wfMessage( ...$res );
|
|
|
|
|
parent::__construct( wfMessage( ...$res )
|
|
|
|
|
->inLanguage( 'en' )->useDatabase( false )->text() );
|
|
|
|
|
}
|
|
|
|
|
}
|