Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2893037
PhabricatorAjaxRequestExceptionHandler.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
924 B
Referenced Files
None
Subscribers
None
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
canHandleRequestException
(
AphrontRequest
$request
,
Exception
$ex
)
{
// For non-workflow requests, return a Ajax response.
return
(
$request
->
isAjax
(
)
&&
!
$request
->
isWorkflow
(
)
)
;
}
public
function
handleRequestException
(
AphrontRequest
$request
,
Exception
$ex
)
{
// Log these; they don't get shown on the client and can be difficult
// to debug.
phlog
(
$ex
)
;
$response
=
new
AphrontAjaxResponse
(
)
;
$response
->
setError
(
array
(
'code'
=>
get_class
(
$ex
)
,
'info'
=>
$ex
->
getMessage
(
)
,
)
)
;
return
$response
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 17:46 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127100
Default Alt Text
PhabricatorAjaxRequestExceptionHandler.php (924 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment