Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97609853
PhabricatorDataNotAttachedException.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
Sun, Jan 5, 16:58
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jan 7, 16:58 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23365517
Attached To
rPH Phabricator
PhabricatorDataNotAttachedException.php
View Options
<?php
final
class
PhabricatorDataNotAttachedException
extends
Exception
{
public
function
__construct
(
PhabricatorLiskDAO
$dao
)
{
$stack
=
debug_backtrace
();
// Shift off `PhabricatorDataNotAttachedException::__construct()`.
array_shift
(
$stack
);
// Shift off `PhabricatorLiskDAO::assertAttached()`.
array_shift
(
$stack
);
$frame
=
head
(
$stack
);
$via
=
null
;
if
(
is_array
(
$frame
))
{
$method
=
idx
(
$frame
,
'function'
);
if
(
preg_match
(
'/^get[A-Z]/'
,
$method
))
{
$via
=
" (via {$method}())"
;
}
}
$class
=
get_class
(
$dao
);
$message
=
"Attempting to access attached data on {$class}{$via}, but the data is "
.
"not actually attached. Before accessing attachable data on an object, "
.
"you must load and attach it.
\n\n
"
.
"Data is normally attached by calling the corresponding needX() "
.
"method on the Query class when the object is loaded. You can also "
.
"call the corresponding attachX() method explicitly."
;
parent
::
__construct
(
$message
);
}
}
Event Timeline
Log In to Comment