function Application::exitWithCrashMessage
@codeCoverageIgnore
1 call to Application::exitWithCrashMessage()
- Application::run in vendor/
phpunit/ phpunit/ src/ TextUI/ Application.php
File
-
vendor/
phpunit/ phpunit/ src/ TextUI/ Application.php, line 706
Class
- Application
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\TextUICode
private function exitWithCrashMessage(Throwable $t) : never {
$message = $t->getMessage();
if (empty(trim($message))) {
$message = '(no message)';
}
printf('%s%sAn error occurred inside PHPUnit.%s%sMessage: %s', PHP_EOL, PHP_EOL, PHP_EOL, PHP_EOL, $message);
$first = true;
if ($t->getPrevious()) {
$t = $t->getPrevious();
}
do {
printf('%s%s: %s:%d%s%s%s%s', PHP_EOL, $first ? 'Location' : 'Caused by', $t->getFile(), $t->getLine(), PHP_EOL, PHP_EOL, $t->getTraceAsString(), PHP_EOL);
$first = false;
} while ($t = $t->getPrevious());
exit(Result::CRASH);
}