1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-10 08:52:39 +01:00

When a file upload fails during "arc diff", show why

Summary: We currently swallow the exception message, but this isn't useful. Fixes T3354.

Test Plan:
  $ arc diff HEAD^ --conduit-uri=http://local.aphront.com:8080/ --only
  Uploading 1 files...
  Failed to upload new binary 'large.png'.

  [HTTP/500] Internal Server Error
  As received by the server, this request had a nonzero content length but no POST data.

  Normally, this indicates that it exceeds the 'post_max_size' setting in the PHP configuration on the server. Increase the 'post_max_size' setting or reduce the size of the request.

  Request size according to 'Content-Length' was '2093052', 'post_max_size' is set to '100K'.

      Continue? [Y/n]

Reviewers: jamesr, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3354

Differential Revision: https://secure.phabricator.com/D6186
This commit is contained in:
epriestley 2013-06-12 05:50:08 -07:00
parent 2e61b1a3df
commit c38bc4376c

View file

@ -2539,7 +2539,8 @@ EOTEXT
$change->setMetadata("{$type}:binary-phid", $phid);
echo pht("Uploaded '%s' (%s).", $name, $type)."\n";
} catch (Exception $e) {
echo "Failed to upload {$type} binary '{$name}'.\n";
echo "Failed to upload {$type} binary '{$name}'.\n\n";
echo $e->getMessage()."\n";
if (!phutil_console_confirm('Continue?', $default_no = false)) {
throw new ArcanistUsageException(
'Aborted due to file upload failure. You can use --skip-binaries '.