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
Thu, Nov 7, 1:50 AM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6724636
Default Alt Text
D13319.diff (1 KB)

Event Timeline