From: epriestley Date: Wed, 7 Mar 2012 04:14:34 +0000 (-0800) Subject: Catch "ConduitClientException", not "Exception", in "arc patch" X-Git-Tag: conduit-4~120 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2c26304dd288c8b846647fdf9990ac38c7c4b08f;p=arcanist.git 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 --- 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.