mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
Linebreak stacktraces in exception messages
Summary: This is a very small step toward making these good, but a concrete reduction in clowniness. Test Plan: Rigged an exception and got a more readable trace. Reviewed By: aran Reviewers: aran CC: aran Differential Revision: 607
This commit is contained in:
parent
90e4e12e3d
commit
8871282037
1 changed files with 5 additions and 1 deletions
|
@ -361,10 +361,14 @@ class AphrontDefaultApplicationConfiguration
|
||||||
$class = phutil_escape_html(get_class($ex));
|
$class = phutil_escape_html(get_class($ex));
|
||||||
$message = phutil_escape_html($ex->getMessage());
|
$message = phutil_escape_html($ex->getMessage());
|
||||||
|
|
||||||
|
$string = (string)$ex;
|
||||||
|
$string = phutil_escape_html($string);
|
||||||
|
$string = str_replace("\n", '<br />', $string);
|
||||||
|
|
||||||
$content =
|
$content =
|
||||||
'<div class="aphront-unhandled-exception">'.
|
'<div class="aphront-unhandled-exception">'.
|
||||||
'<h1>Unhandled Exception "'.$class.'": '.$message.'</h1>'.
|
'<h1>Unhandled Exception "'.$class.'": '.$message.'</h1>'.
|
||||||
'<code>'.phutil_escape_html((string)$ex).'</code>'.
|
'<code>'.$string.'</code>'.
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
||||||
$user = $this->getRequest()->getUser();
|
$user = $this->getRequest()->getUser();
|
||||||
|
|
Loading…
Reference in a new issue