summaryrefslogtreecommitdiff
path: root/includes/api
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-07-18 19:12:44 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-07-18 19:12:44 -0600
commit4bb2aeca1d198391ca856aa16c40b8559c68daec (patch)
tree72371f0fd947bcec45562ccfa1164f3349e4e4e6 /includes/api
parentfa93eabd8fdebb47d623537afbd5e6df1271112a (diff)
parentcacc939b34e315b85e2d72997811eb6677996cc1 (diff)
Merge branch 'archwiki'
Conflicts: extensions/ArchInterWiki.sql extensions/FluxBBAuthPlugin.php
Diffstat (limited to 'includes/api')
-rw-r--r--includes/api/ApiUpload.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php
index 3a9b5c56..e7a7849b 100644
--- a/includes/api/ApiUpload.php
+++ b/includes/api/ApiUpload.php
@@ -187,7 +187,12 @@ class ApiUpload extends ApiBase {
$chunkPath = $request->getFileTempname( 'chunk' );
$chunkSize = $request->getUpload( 'chunk' )->getSize();
if ($this->mParams['offset'] == 0) {
- $result['filekey'] = $this->performStash();
+ try {
+ $result['filekey'] = $this->performStash();
+ } catch ( MWException $e ) {
+ // FIXME: Error handling here is wrong/different from rest of this
+ $this->dieUsage( $e->getMessage(), 'stashfailed' );
+ }
} else {
$status = $this->mUpload->addChunk($chunkPath, $chunkSize,
$this->mParams['offset']);