Skip to content

Commit

Permalink
Improve detailed error output
Browse files Browse the repository at this point in the history
Switch from simple, table-based layout to a div with a title, subtitles.

Fixes #23943
  • Loading branch information
dregad authored and vboctor committed Feb 7, 2018
1 parent 471e7ff commit 78cbf34
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
32 changes: 18 additions & 14 deletions core/error_api.php
Expand Up @@ -433,20 +433,24 @@ function error_print_delayed() {
* @return void
*/
function error_print_details( $p_file, $p_line, array $p_context ) {
?>
<table class="width-100">
<tr>
<td>Full path: <?php echo htmlentities( $p_file, ENT_COMPAT, 'UTF-8' );?></td>
</tr>
<tr>
<td>Line: <?php echo $p_line?></td>
</tr>
<tr>
<td>
<?php error_print_context( $p_context )?>
</td>
</tr>
</table>
?>
<div class="error-details">
<hr>
<h2>Detailed error information</h2>
<ul>
<li>Full path:
<span class="code">
<?php echo htmlentities( $p_file, ENT_COMPAT, 'UTF-8' );?>
</span>
</li>
<li>Line number:
<span class="code"><?php echo $p_line ?></span>
</li>
</ul>

<h3>Context</h3>
<?php error_print_context( $p_context )?>
</div>
<?php
}

Expand Down
6 changes: 5 additions & 1 deletion css/default.css
Expand Up @@ -100,4 +100,8 @@ td.print-overdue { font-weight: bold; }
/* strike-through resolved issues: #22492 */
.resolved {
text-decoration: line-through;
}
}

.error-details .code {
font-family: monospace;
}

0 comments on commit 78cbf34

Please sign in to comment.