Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Throwable.php

function Throwable::asString

Throws

NoPreviousThrowableException

File

vendor/phpunit/phpunit/src/Event/Value/Throwable.php, line 46

Class

Throwable
@psalm-immutable

Namespace

PHPUnit\Event\Code

Code

public function asString() : string {
    $buffer = $this->description();
    if (!empty($this->stackTrace())) {
        $buffer .= PHP_EOL . $this->stackTrace();
    }
    if ($this->hasPrevious()) {
        $buffer .= PHP_EOL . 'Caused by' . PHP_EOL . $this->previous()
            ->asString();
    }
    return $buffer;
}
RSS feed
Powered by Drupal