From 938b5c69c6c6216a3d3d877496d55e3e5a52ccee Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 23 Jul 2013 12:54:30 -0700 Subject: [PATCH] Use PhutilProxyException to disambiguate repository pull errors Summary: Ref T2569. When repository pulls fail, they don't necessarily list identifying information about which repository failed. Use a proxy exception to list that information. Test Plan: {F51267} Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2569 Differential Revision: https://secure.phabricator.com/D6548 --- .../daemon/PhabricatorRepositoryPullLocalDaemon.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php b/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php index b8a693a48f..f4c96b09c9 100644 --- a/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php +++ b/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php @@ -117,8 +117,9 @@ final class PhabricatorRepositoryPullLocalDaemon continue; } + $callsign = $repository->getCallsign(); + try { - $callsign = $repository->getCallsign(); $this->log("Updating repository '{$callsign}'."); id(new PhabricatorRepositoryPullEngine()) @@ -150,7 +151,11 @@ final class PhabricatorRepositoryPullLocalDaemon $this->log("Failed to acquire lock."); } catch (Exception $ex) { $retry_after[$id] = time() + $min_sleep; - phlog($ex); + + $proxy = new PhutilProxyException( + "Error while fetching changes to the '{$callsign}' repository.", + $ex); + phlog($proxy); } $this->stillWorking();