mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Render internal stack frames more reasonably
Summary: Some stack frames do not have file/line information, e.g. __autoload triggers. Render these as "Internal". Test Plan: Reloaded a trace with an internal __autoload() frame, got "(Internal)" instead of ": 0" with warnings. Reviewers: jungejason, tuomaspelkonen, aran Reviewed By: jungejason CC: aran, jungejason Differential Revision: 843
This commit is contained in:
parent
fd0f4d9c52
commit
04b4f04cb9
1 changed files with 21 additions and 17 deletions
|
@ -505,7 +505,7 @@ class AphrontDefaultApplicationConfiguration
|
|||
$depth = count($trace);
|
||||
foreach ($trace as $part) {
|
||||
$lib = null;
|
||||
$file = $part['file'];
|
||||
$file = idx($part, 'file');
|
||||
$relative = $file;
|
||||
foreach ($libraries as $library) {
|
||||
$root = phutil_get_library_root($library);
|
||||
|
@ -524,24 +524,28 @@ class AphrontDefaultApplicationConfiguration
|
|||
$where .= $part['function'].'()';
|
||||
}
|
||||
|
||||
if (isset($browse[$lib])) {
|
||||
$file_name = phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $browse[$lib].$relative.'$'.$part['line'],
|
||||
'title' => $file,
|
||||
'target' => '_blank',
|
||||
),
|
||||
phutil_escape_html($relative));
|
||||
if ($file) {
|
||||
if (isset($browse[$lib])) {
|
||||
$file_name = phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $browse[$lib].$relative.'$'.$part['line'],
|
||||
'title' => $file,
|
||||
'target' => '_blank',
|
||||
),
|
||||
phutil_escape_html($relative));
|
||||
} else {
|
||||
$file_name = phutil_render_tag(
|
||||
'span',
|
||||
array(
|
||||
'title' => $file,
|
||||
),
|
||||
phutil_escape_html($relative));
|
||||
}
|
||||
$file_name = $file_name.' : '.(int)$part['line'];
|
||||
} else {
|
||||
$file_name = phutil_render_tag(
|
||||
'span',
|
||||
array(
|
||||
'title' => $file,
|
||||
),
|
||||
phutil_escape_html($relative));
|
||||
$file_name = '<em>(Internal)</em>';
|
||||
}
|
||||
$file_name = $file_name.' : '.(int)$part['line'];
|
||||
|
||||
|
||||
$rows[] = array(
|
||||
|
|
Loading…
Reference in a new issue