1
0
Fork 0
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:
epriestley 2011-07-07 12:49:59 -07:00
parent 90e4e12e3d
commit 8871282037

View file

@ -361,10 +361,14 @@ class AphrontDefaultApplicationConfiguration
$class = phutil_escape_html(get_class($ex));
$message = phutil_escape_html($ex->getMessage());
$string = (string)$ex;
$string = phutil_escape_html($string);
$string = str_replace("\n", '<br />', $string);
$content =
'<div class="aphront-unhandled-exception">'.
'<h1>Unhandled Exception "'.$class.'": '.$message.'</h1>'.
'<code>'.phutil_escape_html((string)$ex).'</code>'.
'<code>'.$string.'</code>'.
'</div>';
$user = $this->getRequest()->getUser();