$this->verifyChunk();
$this->mTempPath = $oldTemp;
} catch ( UploadChunkVerificationException $e ) {
- return Status::newFatal( $e->getMessage() );
+ return Status::newFatal( $e->msg );
}
$status = $this->outputChunk( $chunkPath );
if ( $status->isGood() ) {
$this->mDesiredDestName = $oldDesiredDestName;
$this->mTitle = false;
if ( is_array( $res ) ) {
- throw new UploadChunkVerificationException( $res[0] );
+ throw new UploadChunkVerificationException( $res );
}
}
}
}
class UploadChunkVerificationException extends MWException {
+ public $msg;
+ public function __construct( $res ) {
+ $this->msg = call_user_func_array( 'wfMessage', $res );
+ parent::__construct( call_user_func_array( 'wfMessage', $res )
+ ->inLanguage( 'en' )->useDatabase( false )->text() );
+ }
}