class ThrowableBuilder
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
@internal This class is not covered by the backward compatibility promise for PHPUnit
Hierarchy
- class \PHPUnit\Event\Code\ThrowableBuilder
Expanded class hierarchy of ThrowableBuilder
2 files declare their use of ThrowableBuilder
- AbstractPhpProcess.php in vendor/
phpunit/ phpunit/ src/ Util/ PHP/ AbstractPhpProcess.php - PhptTestCase.php in vendor/
phpunit/ phpunit/ src/ Runner/ PhptTestCase.php
File
-
vendor/
phpunit/ phpunit/ src/ Event/ Value/ ThrowableBuilder.php, line 22
Namespace
PHPUnit\Event\CodeView source
final class ThrowableBuilder {
/**
* @throws Exception
* @throws NoPreviousThrowableException
*/
public static function from(\Throwable $t) : Throwable {
$previous = $t->getPrevious();
if ($previous !== null) {
$previous = self::from($previous);
}
return new Throwable($t::class, $t->getMessage(), ThrowableToStringMapper::map($t), Filter::getFilteredStacktrace($t, false), $previous);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ThrowableBuilder::from | public static | function |