From 2c26304dd288c8b846647fdf9990ac38c7c4b08f Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 6 Mar 2012 20:14:34 -0800 Subject: [PATCH] Catch "ConduitClientException", not "Exception", in "arc patch" Summary: This may raise other types of exceptions, e.g. http/network exceptions, where getErrorCode() is not defined. Test Plan: Reasoned about beahvior. Reviewers: btrahan Reviewed By: btrahan CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1804 --- src/workflow/patch/ArcanistPatchWorkflow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workflow/patch/ArcanistPatchWorkflow.php b/src/workflow/patch/ArcanistPatchWorkflow.php index daa6a55c..de4d025b 100644 --- a/src/workflow/patch/ArcanistPatchWorkflow.php +++ b/src/workflow/patch/ArcanistPatchWorkflow.php @@ -349,7 +349,7 @@ EOTEXT $param); break; } - } catch (Exception $ex) { + } catch (ConduitClientException $ex) { if ($ex->getErrorCode() == 'ERR-INVALID-SESSION') { // Phabricator is not configured to allow anonymous access to // Differential. -- 2.43.0