10000 Fixed regression when exception message swallowed when logging it. · enumag/symfony@042cb6b · GitHub
[go: up one dir, main page]

Skip to content

Commit 042cb6b

Browse files
committed
Fixed regression when exception message swallowed when logging it.
1 parent ca0fdf8 commit 042cb6b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ private function sanitizeContext($context)
147147
}
148148

149149
if (is_object($context)) {
150+
if ($context instanceof \Exception) {
151+
return sprintf('Exception(%s): %s', get_class($context), $context->getMessage());
152+
}
153+
150154
return sprintf('Object(%s)', get_class($context));
151155
}
152156

0 commit comments

Comments
 (0)
0