Skip to content
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

Add stack trace for previous exceptions to bootstrap error message #5346

Merged
merged 1 commit into from
May 9, 2023

Conversation

Steveb-p
Copy link
Contributor

@Steveb-p Steveb-p commented Apr 24, 2023

Addendum to #4620 and #4878.
Closes #5345

Adds previous exception stacktraces into the output, until there is no more left.

 Error in bootstrap script: PHPUnit\TestFixture\MyException:
 Big boom. Big bada boom.
 #0 /home/pniedzielski/PhpstormProjects/phpunit/src/Util/FileLoader.php(66): include_once()
 #1 /home/pniedzielski/PhpstormProjects/phpunit/src/Util/FileLoader.php(49): PHPUnit\Util\FileLoader::load()
 #2 /home/pniedzielski/PhpstormProjects/phpunit/src/TextUI/Command.php(565): PHPUnit\Util\FileLoader::checkAndLoad()
 #3 /home/pniedzielski/PhpstormProjects/phpunit/src/TextUI/Command.php(402): PHPUnit\TextUI\Command->handleBootstrap()
 #4 /home/pniedzielski/PhpstormProjects/phpunit/src/TextUI/Command.php(112): PHPUnit\TextUI\Command->handleArguments()
 #5 /home/pniedzielski/PhpstormProjects/phpunit/src/TextUI/Command.php(97): PHPUnit\TextUI\Command->run()
 #6 Standard input code(11): PHPUnit\TextUI\Command::main()
 #7 {main}
 
 Previous exception: Exception:
 Previous boom.
 #0 /home/pniedzielski/PhpstormProjects/phpunit/src/Util/FileLoader.php(66): include_once()
 #1 /home/pniedzielski/PhpstormProjects/phpunit/src/Util/FileLoader.php(49): PHPUnit\Util\FileLoader::load()
 #2 /home/pniedzielski/PhpstormProjects/phpunit/src/TextUI/Command.php(565): PHPUnit\Util\FileLoader::checkAndLoad()
 #3 /home/pniedzielski/PhpstormProjects/phpunit/src/TextUI/Command.php(402): PHPUnit\TextUI\Command->handleBootstrap()
 #4 /home/pniedzielski/PhpstormProjects/phpunit/src/TextUI/Command.php(112): PHPUnit\TextUI\Command->handleArguments()
 #5 /home/pniedzielski/PhpstormProjects/phpunit/src/TextUI/Command.php(97): PHPUnit\TextUI\Command->run()
 #6 Standard input code(11): PHPUnit\TextUI\Command::main()
 #7 {main}

@codecov
Copy link

codecov bot commented May 2, 2023

Codecov Report

Merging #5346 (29827ea) into 9.6 (c993f0d) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                9.6    #5346      +/-   ##
============================================
+ Coverage     83.18%   83.20%   +0.01%     
- Complexity     4616     4617       +1     
============================================
  Files           271      271              
  Lines         13662    13674      +12     
============================================
+ Hits          11365    11377      +12     
  Misses         2297     2297              
Impacted Files Coverage Δ
src/TextUI/Command.php 74.89% <100.00%> (+0.64%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sebastianbergmann sebastianbergmann merged commit b7513d5 into sebastianbergmann:9.6 May 9, 2023
@Steveb-p Steveb-p deleted the 9.6 branch May 9, 2023 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants