Skip to content

Commit

Permalink
add stack trace to bootstrap error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneOH authored and sebastianbergmann committed Mar 8, 2022
1 parent d4609a3 commit 652c4fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/TextUI/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,12 @@ protected function handleBootstrap(string $filename): void

$this->exitWithErrorMessage(
sprintf(
'Error in bootstrap script: %s:%s%s',
'Error in bootstrap script: %s:%s%s%s%s',
get_class($t),
PHP_EOL,
$t->getMessage()
$t->getMessage(),
PHP_EOL,
$t->getTraceAsString()
)
);
}
Expand Down
3 changes: 2 additions & 1 deletion tests/end-to-end/regression/GitHub/4620.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
https://github.com/sebastianbergmann/phpunit/issues/4620
GH-4620 GH-4877
--FILE--
<?php declare(strict_types=1);

Expand All @@ -17,3 +17,4 @@ PHPUnit %s #StandWithUkraine

Error in bootstrap script: PHPUnit\TestFixture\MyException:
Big boom. Big bada boom.
%a

0 comments on commit 652c4fd

Please sign in to comment.