1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 04:50:55 +01:00

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
This commit is contained in:
Bob Trahan 2014-10-29 09:28:29 -07:00
parent dc6b988dea
commit dd49096a85

View file

@ -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;