From c38bc4376c2d51fc1c1137eee7bbc2dd5528e351 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 12 Jun 2013 05:50:08 -0700 Subject: [PATCH] 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 --- src/workflow/ArcanistDiffWorkflow.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php index 13f54881..84f29b7b 100644 --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -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 '. -- 2.43.0