8000 [Console] Exception rendering fixes by Seldaek · Pull Request #3802 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console] Exception rendering fixes #3802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 6, 2012
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Console] Avoid outputing \r's in exception messages
  • Loading branch information
Seldaek committed Apr 6, 2012
commit 97f7b29783e963f2badea3b4ca48ef21d2633d2d
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ public function renderException($e, $output)
$title = sprintf(' [%s] ', get_class($e));
$len = $strlen($title);
$lines = array();
foreach (explode("\n", $e->getMessage()) as $line) {
foreach (preg_split("{\r?\n}", $e->getMessage()) as $line) {
$lines[] = sprintf(' %s ', $line);
$len = max($strlen($line) + 4, $len);
}
Expand Down
0