From e651169879783ac3b4c137d560995b38a0766fdc Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 2 Mar 2015 16:36:44 -0800 Subject: [PATCH] Improve exception when creating a cyclic dependency in Maniphest Summary: Fixes T6815. This was overlooked in D9838. This could be prettier, but does the job. Test Plan: {F327790} Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T6815 Differential Revision: https://secure.phabricator.com/D11937 --- .../controller/PhabricatorSearchAttachController.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/applications/search/controller/PhabricatorSearchAttachController.php b/src/applications/search/controller/PhabricatorSearchAttachController.php index 890831ac71..e08fd7734c 100644 --- a/src/applications/search/controller/PhabricatorSearchAttachController.php +++ b/src/applications/search/controller/PhabricatorSearchAttachController.php @@ -84,9 +84,14 @@ final class PhabricatorSearchAttachController '+' => array_fuse($add_phids), '-' => array_fuse($rem_phids), )); - $txn_editor->applyTransactions( - $object->getApplicationTransactionObject(), - array($txn_template)); + + try { + $txn_editor->applyTransactions( + $object->getApplicationTransactionObject(), + array($txn_template)); + } catch (PhabricatorEdgeCycleException $ex) { + $this->raiseGraphCycleException($ex); + } return id(new AphrontReloadResponse())->setURI($handle->getURI()); } else {