Skip to content

Commit

Permalink
suggested changes for previous output in plaintext handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Flori committed Dec 3, 2018
1 parent 88b9298 commit bce5c5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Whoops/Handler/PlainTextHandler.php
Expand Up @@ -176,7 +176,7 @@ public function generateResponse()
if ($this->addPreviousToOutput) {
$previous = $exception->getPrevious();
while ($previous) {
$message .= "\nBefore: " . $this->getExceptionOutput($previous);
$message .= "\n\nCaused by\n" . $this->getExceptionOutput($previous);
$previous = $previous->getPrevious();
}
}
Expand Down Expand Up @@ -313,7 +313,7 @@ private function getTraceOutput()
* @param \Throwable $exception
* @return string
*/
protected function getExceptionOutput($exception)
private function getExceptionOutput($exception)
{
return sprintf(
"%s: %s in file %s on line %d",
Expand Down
2 changes: 1 addition & 1 deletion tests/Whoops/Handler/PlainTextHandlerTest.php
Expand Up @@ -267,7 +267,7 @@ public function testReturnsWithPreviousExceptions()
'Outer exception message',
__FILE__,
258,
'Before: ' . RuntimeException::class,
"\nCaused by\n" . RuntimeException::class,
'Inner exception message',
__FILE__,
258
Expand Down

0 comments on commit bce5c5f

Please sign in to comment.