Path: blob/master/src/infrastructure/cluster/exception/PhabricatorClusterExceptionHandler.php
12241 views
<?php12final class PhabricatorClusterExceptionHandler3extends PhabricatorRequestExceptionHandler {45public function getRequestExceptionHandlerPriority() {6return 300000;7}89public function getRequestExceptionHandlerDescription() {10return pht('Handles runtime problems with cluster configuration.');11}1213public function canHandleRequestThrowable(14AphrontRequest $request,15$throwable) {16return ($throwable instanceof PhabricatorClusterException);17}1819public function handleRequestThrowable(20AphrontRequest $request,21$throwable) {2223$viewer = $this->getViewer($request);2425$title = $throwable->getExceptionTitle();2627$dialog = id(new AphrontDialogView())28->setTitle($title)29->setUser($viewer)30->appendParagraph($throwable->getMessage())31->addCancelButton('/', pht('Proceed With Caution'));3233return id(new AphrontDialogResponse())34->setDialog($dialog)35->setHTTPResponseCode(500);36}3738}394041