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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user