mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 13:00:56 +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:
parent
dc6b988dea
commit
dd49096a85
1 changed files with 5 additions and 4 deletions
|
@ -62,7 +62,6 @@ final class PhabricatorRepositoryCommitHeraldWorker
|
||||||
try {
|
try {
|
||||||
$raw_patch = $this->loadRawPatchText($repository, $commit);
|
$raw_patch = $this->loadRawPatchText($repository, $commit);
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
phlog($ex);
|
|
||||||
$raw_patch = pht('Unable to generate patch: %s', $ex->getMessage());
|
$raw_patch = pht('Unable to generate patch: %s', $ex->getMessage());
|
||||||
}
|
}
|
||||||
$editor->setRawPatch($raw_patch);
|
$editor->setRawPatch($raw_patch);
|
||||||
|
@ -99,9 +98,11 @@ final class PhabricatorRepositoryCommitHeraldWorker
|
||||||
if ($byte_limit && $size > $byte_limit) {
|
if ($byte_limit && $size > $byte_limit) {
|
||||||
$pretty_size = phutil_format_bytes($size);
|
$pretty_size = phutil_format_bytes($size);
|
||||||
$pretty_limit = phutil_format_bytes($byte_limit);
|
$pretty_limit = phutil_format_bytes($byte_limit);
|
||||||
throw new Exception(
|
throw new Exception(pht(
|
||||||
"Patch size of {$pretty_size} exceeds configured byte size limit of ".
|
'Patch size of %s exceeds configured byte size limit (%s) of %s.',
|
||||||
"{$pretty_limit}.");
|
$pretty_size,
|
||||||
|
$byte_key,
|
||||||
|
$pretty_limit));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $raw_diff;
|
return $raw_diff;
|
||||||
|
|
Loading…
Reference in a new issue