Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93088933
PhabricatorAjaxRequestExceptionHandler.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 26, 03:20
Size
940 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 03:20 (2 d)
Engine
blob
Format
Raw Data
Handle
22571975
Attached To
rPH Phabricator
PhabricatorAjaxRequestExceptionHandler.php
View Options
<?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
;
}
}
Event Timeline
Log In to Comment