Skip to content

Commit

Permalink
Merge pull request #46 from M6Web/feature/allow-easy-exceptionformatt…
Browse files Browse the repository at this point in the history
…er-overriding

allow partial ExceptionFormatter override
  • Loading branch information
Oliboy50 authored Jan 11, 2017
2 parents 025e4fc + 29f8b73 commit 7ab8113
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function getLogContent(Request $request, Response $response, array $optio
if ($request->attributes->has($this->requestExceptionAttribute)) {
$exception = $request->attributes->get($this->requestExceptionAttribute);

$logContent .= self::getExceptionTrace($exception);
$logContent .= $this->getExceptionTrace($exception);
}

return $logContent;
Expand All @@ -53,10 +53,10 @@ public function getLogContent(Request $request, Response $response, array $optio
*/
protected function getExceptionTrace(\Exception $exception, $level = 1)
{
$exceptionTrace = self::formatException($exception, $level);
$exceptionTrace = $this->formatException($exception, $level);

if (($previousException = $exception->getPrevious()) !== null) {
$exceptionTrace .= self::getExceptionTrace($previousException, $level + 1);
$exceptionTrace .= $this->getExceptionTrace($previousException, $level + 1);
}

return $exceptionTrace;
Expand Down

0 comments on commit 7ab8113

Please sign in to comment.