]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use PhutilInvalidStateException
authorJoshua Spence <josh@joshuaspence.com>
Thu, 18 Jun 2015 12:41:29 +0000 (22:41 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Thu, 18 Jun 2015 12:41:30 +0000 (22:41 +1000)
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

src/workflow/ArcanistCloseWorkflow.php

index b32b9caa88bea2d6b95b47c30b634e83af7e9ef7..5076d60321c4048f6a380f0096aaa3e7352be8ae 100644 (file)
@@ -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');
   }