mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10: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);
|
$depth = count($trace);
|
||||||
foreach ($trace as $part) {
|
foreach ($trace as $part) {
|
||||||
$lib = null;
|
$lib = null;
|
||||||
$file = $part['file'];
|
$file = idx($part, 'file');
|
||||||
$relative = $file;
|
$relative = $file;
|
||||||
foreach ($libraries as $library) {
|
foreach ($libraries as $library) {
|
||||||
$root = phutil_get_library_root($library);
|
$root = phutil_get_library_root($library);
|
||||||
|
@ -524,6 +524,7 @@ class AphrontDefaultApplicationConfiguration
|
||||||
$where .= $part['function'].'()';
|
$where .= $part['function'].'()';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($file) {
|
||||||
if (isset($browse[$lib])) {
|
if (isset($browse[$lib])) {
|
||||||
$file_name = phutil_render_tag(
|
$file_name = phutil_render_tag(
|
||||||
'a',
|
'a',
|
||||||
|
@ -542,6 +543,9 @@ class AphrontDefaultApplicationConfiguration
|
||||||
phutil_escape_html($relative));
|
phutil_escape_html($relative));
|
||||||
}
|
}
|
||||||
$file_name = $file_name.' : '.(int)$part['line'];
|
$file_name = $file_name.' : '.(int)$part['line'];
|
||||||
|
} else {
|
||||||
|
$file_name = '<em>(Internal)</em>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$rows[] = array(
|
$rows[] = array(
|
||||||
|
|
Loading…
Reference in a new issue