}
} catch ( UploadStashException $e ) {
$this->handleStashException( $e );
- } catch ( MWException $e ) {
+ } catch ( Exception $e ) {
$this->dieUsage( $e->getMessage(), 'stashfailed' );
}
try {
$result['filekey'] = $this->performStash();
$result['sessionkey'] = $result['filekey']; // backwards compatibility
- } catch ( UploadStashException $e ) {
- $this->handleStashException( $e );
- } catch ( MWException $e ) {
+ } catch ( Exception $e ) {
$result['warnings']['stashfailed'] = $e->getMessage();
}
$filekey = $this->performStash();
} catch ( UploadStashException $e ) {
$this->handleStashException( $e );
- } catch ( MWException $e ) {
+ } catch ( Exception $e ) {
// FIXME: Error handling here is wrong/different from rest of this
$this->dieUsage( $e->getMessage(), 'stashfailed' );
}
throw new MWException( 'Invalid stashed file' );
}
$fileKey = $stashFile->getFileKey();
- } catch ( MWException $e ) {
+ } catch ( Exception $e ) {
$message = 'Stashing temporary file failed: ' . get_class( $e ) . ' ' . $e->getMessage();
wfDebug( __METHOD__ . ' ' . $message . "\n" );
$className = get_class( $e );
try {
$data['filekey'] = $this->performStash();
$data['sessionkey'] = $data['filekey'];
- } catch ( MWException $e ) {
+ } catch ( Exception $e ) {
$data['stashfailed'] = $e->getMessage();
}
$data['invalidparameter'] = $parameter;
return 'csrf';
}
- public function getExamplesMessages() {
+ protected function getExamplesMessages() {
return array(
'action=upload&filename=Wiki.png' .
'&url=http%3A//upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png&token=123ABC'