From: Joshua Spence Date: Thu, 18 Jun 2015 12:41:29 +0000 (+1000) Subject: Use PhutilInvalidStateException X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=3414cbeda5036c81009287ef3f726e3a5a93fc7c;p=arcanist.git Use PhutilInvalidStateException Summary: Use `PhutilInvalidStateException` where appropriate. Test Plan: N/A Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D13333 --- diff --git a/src/workflow/ArcanistCloseWorkflow.php b/src/workflow/ArcanistCloseWorkflow.php index b32b9caa..5076d603 100644 --- a/src/workflow/ArcanistCloseWorkflow.php +++ b/src/workflow/ArcanistCloseWorkflow.php @@ -18,13 +18,13 @@ final class ArcanistCloseWorkflow extends ArcanistWorkflow { private function getStatusOptions() { if ($this->statusData === null) { - throw new Exception(pht('Call %s first!', 'loadStatusData()')); + throw new PhutilInvalidStateException('loadStatusData'); } return idx($this->statusData, 'statusMap'); } private function getDefaultClosedStatus() { if ($this->statusData === null) { - throw new Exception(pht('Call %s first!', 'loadStatusData()')); + throw new PhutilInvalidStateException('loadStatusData'); } return idx($this->statusData, 'defaultClosedStatus'); }