Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104173133
PhutilProxyException.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
Fri, Mar 7, 00:01
Size
986 B
Mime Type
text/x-php
Expires
Sun, Mar 9, 00:01 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24752488
Attached To
rPHU libphutil
PhutilProxyException.php
View Options
<?php
/**
* Prior to PHP 5.3, PHP does not support nested exceptions; this class provides
* limited support for nested exceptions. Use methods on
* @{class:PhutilErrorHandler} to unnest exceptions in a forward-compatible way.
*
* @concrete-extensible
* @group error
*/
class
PhutilProxyException
extends
Exception
{
private
$previousException
;
public
function
__construct
(
$message
,
Exception
$previous
,
$code
=
0
)
{
$this
->
previousException
=
$previous
;
if
(
version_compare
(
PHP_VERSION
,
'5.3.0'
,
'>='
))
{
parent
::
__construct
(
$message
,
$code
,
$previous
);
}
else
{
parent
::
__construct
(
$message
,
$code
);
}
}
public
function
getPreviousException
()
{
// NOTE: This can not be named "getPrevious()" because that method is final
// after PHP 5.3. Similarly, the property can not be named "previous"
// because HPHP declares a property with the same name and "protected"
// visibility.
return
$this
->
previousException
;
}
}
Event Timeline
Log In to Comment