Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
| Show First 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | if ($ex instanceof PhabricatorPolicyException) { | ||||
| $dialog->addCancelButton('/', pht('OK')); | $dialog->addCancelButton('/', pht('OK')); | ||||
| } | } | ||||
| $response = new AphrontDialogResponse(); | $response = new AphrontDialogResponse(); | ||||
| $response->setDialog($dialog); | $response->setDialog($dialog); | ||||
| return $response; | return $response; | ||||
| } | } | ||||
| if ($ex instanceof AphrontUsageException) { | |||||
| $error = new PHUIInfoView(); | |||||
| $error->setTitle($ex->getTitle()); | |||||
| $error->appendChild($ex->getMessage()); | |||||
| $view = new PhabricatorStandardPageView(); | |||||
| $view->setRequest($this->getRequest()); | |||||
| $view->appendChild($error); | |||||
| $response = new AphrontWebpageResponse(); | |||||
| $response->setContent($view->render()); | |||||
| $response->setHTTPResponseCode(500); | |||||
| return $response; | |||||
| } | |||||
| // Always log the unhandled exception. | // Always log the unhandled exception. | ||||
| phlog($ex); | phlog($ex); | ||||
| $class = get_class($ex); | $class = get_class($ex); | ||||
| $message = $ex->getMessage(); | $message = $ex->getMessage(); | ||||
| if ($ex instanceof AphrontSchemaQueryException) { | if ($ex instanceof AphrontSchemaQueryException) { | ||||
| $message .= "\n\n".pht( | $message .= "\n\n".pht( | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||