Skip to content

Commit

Permalink
hotfix for error message format
Browse files Browse the repository at this point in the history
  • Loading branch information
Kooooooma committed Jun 2, 2017
1 parent 4bdcbca commit 864946e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/PHPErrors.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,24 @@ public function handleException(\Throwable $exception)

if ($type & self::$reportLevel) {
$message = $this->formatMessage(
$exception->getTraceAsString(),
$exception->getMessage(),
$exception->getFile(),
$exception->getLine()
$exception->getLine(),
$exception->getTraceAsString()
);

return $this->log($type, $message);
}
}
}

public function formatMessage($message, $file, $line)
public function formatMessage($message, $file, $line, $trace = '')
{
return $message = "{$file}#{$line}: {$message}";
$message = "{$file}#{$line}: {$message}";
return <<<MSG
$message
$trace
MSG;
}

public function getErrorLevel($type)
Expand Down

0 comments on commit 864946e

Please sign in to comment.