Page MenuHomePhabricator

D13319.diff
No OneTemporary

D13319.diff

diff --git a/src/applications/repository/customfield/PhabricatorCommitBranchesField.php b/src/applications/repository/customfield/PhabricatorCommitBranchesField.php
--- a/src/applications/repository/customfield/PhabricatorCommitBranchesField.php
+++ b/src/applications/repository/customfield/PhabricatorCommitBranchesField.php
@@ -29,18 +29,25 @@
'callsign' => $this->getObject()->getRepository()->getCallsign(),
);
- $branches_raw = id(new ConduitCall('diffusion.branchquery', $params))
- ->setUser($this->getViewer())
- ->execute();
-
- $branches = DiffusionRepositoryRef::loadAllFromDictionaries($branches_raw);
- if (!$branches) {
- return;
+ try {
+ $branches_raw = id(new ConduitCall('diffusion.branchquery', $params))
+ ->setUser($this->getViewer())
+ ->execute();
+
+ $branches = DiffusionRepositoryRef::loadAllFromDictionaries(
+ $branches_raw);
+ if (!$branches) {
+ return;
+ }
+
+ $branch_names = mpull($branches, 'getShortName');
+ sort($branch_names);
+ $branch_text = implode(', ', $branch_names);
+ } catch (Exception $ex) {
+ $branch_text = pht('<%s: %s>', get_class($ex), $ex->getMessage());
}
- $branch_names = mpull($branches, 'getShortName');
- sort($branch_names);
- $body->addTextSection(pht('BRANCHES'), implode(', ', $branch_names));
+ $body->addTextSection(pht('BRANCHES'), $branch_text);
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 5:56 AM (21 h, 17 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6917663
Default Alt Text
D13319.diff (1 KB)

Event Timeline