Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
PHP
at commit 00a20d3c
12345678910111213141516171819202122232425262728293031323334353637383940<?php
final class PhabricatorAjaxRequestExceptionHandler extends PhabricatorRequestExceptionHandler {
public function getRequestExceptionHandlerPriority() { return 110000; }
public function getRequestExceptionHandlerDescription() { return pht('Responds to requests made by AJAX clients.'); }
public function canHandleRequestThrowable( AphrontRequest $request, $throwable) { // For non-workflow requests, return a Ajax response. return ($request->isAjax() && !$request->isWorkflow()); }
public function handleRequestThrowable( AphrontRequest $request, $throwable) {
// Log these; they don't get shown on the client and can be difficult // to debug. phlog($throwable);
$response = new AphrontAjaxResponse(); $response->setError( array( 'code' => get_class($throwable), 'info' => $throwable->getMessage(), ));
return $response; }
}