"MDL-20824, use php exception to processs the file which excess the maximum file size"

This commit is contained in:
Dongsheng Cai 2009-11-13 05:31:02 +00:00
parent 66ec8e8b44
commit 7d9cb3b51a
5 changed files with 100 additions and 97 deletions

View file

@ -279,11 +279,12 @@ EOD;
break;
case 'upload':
try {
$upload = $repo->get_listing();
$upload['client_id'] = $client_id;
echo json_encode($upload);
} catch (repository_exception $e){
$result = $repo->upload();
$result['client_id'] = $client_id;
echo json_encode($result);
} catch (Exception $e){
$err->e = $e->getMessage();
$err->client_id = $client_id;
die(json_encode($err));
}
break;