Use PhutilInvalidStateException

Summary: Use `PhutilInvalidStateException`. Depends on D12803.

Test Plan: Unit tests pass.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12829
This commit is contained in:
Joshua Spence
2015-05-14 07:53:52 +10:00
parent acb45968d8
commit 61b178f44e
34 changed files with 47 additions and 74 deletions

View File

@@ -55,18 +55,12 @@ final class PhabricatorApplicationSearchController
$engine = $this->getSearchEngine();
if (!$engine) {
throw new Exception(
pht(
'Call %s before delegating to this controller!',
'setEngine()'));
throw new PhutilInvalidStateException('setEngine');
}
$nav = $this->getNavigation();
if (!$nav) {
throw new Exception(
pht(
'Call %s before delegating to this controller!',
'setNavigation()'));
throw new PhutilInvalidStateException('setNavigation');
}
$engine->setViewer($this->getRequest()->getUser());