From dd49096a857bad4edd44cb7c17b41261dfece968 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Wed, 29 Oct 2014 09:28:29 -0700 Subject: [PATCH] Diffusion - upgrade exception error message to include hint to config option Summary: Fixes T6419. Also, there was a question on T6419 about whether this was in a try catch block and it is... Its not clear to me what happens in the "timeout" case though? Test Plan: looks nice Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6419 Differential Revision: https://secure.phabricator.com/D10755 --- .../worker/PhabricatorRepositoryCommitHeraldWorker.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php b/src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php index 62290f7a93..c7af5215dd 100644 --- a/src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php +++ b/src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php @@ -62,7 +62,6 @@ final class PhabricatorRepositoryCommitHeraldWorker try { $raw_patch = $this->loadRawPatchText($repository, $commit); } catch (Exception $ex) { - phlog($ex); $raw_patch = pht('Unable to generate patch: %s', $ex->getMessage()); } $editor->setRawPatch($raw_patch); @@ -99,9 +98,11 @@ final class PhabricatorRepositoryCommitHeraldWorker if ($byte_limit && $size > $byte_limit) { $pretty_size = phutil_format_bytes($size); $pretty_limit = phutil_format_bytes($byte_limit); - throw new Exception( - "Patch size of {$pretty_size} exceeds configured byte size limit of ". - "{$pretty_limit}."); + throw new Exception(pht( + 'Patch size of %s exceeds configured byte size limit (%s) of %s.', + $pretty_size, + $byte_key, + $pretty_limit)); } return $raw_diff;