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

Breadcrumb

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

function Process::getIncrementalErrorOutput

Returns the errorOutput incrementally.

In comparison with the getErrorOutput method which always return the whole error output, this one returns the new error output since the last call.

Throws

LogicException in case the output has been disabled

LogicException In case the process is not started

File

vendor/symfony/process/Process.php, line 728

Class

Process
Process is a thin wrapper around proc_* functions to easily start independent PHP processes.

Namespace

Symfony\Component\Process

Code

public function getIncrementalErrorOutput() : string {
    $this->readPipesForOutput(__FUNCTION__);
    $latest = stream_get_contents($this->stderr, -1, $this->incrementalErrorOutputOffset);
    $this->incrementalErrorOutputOffset = ftell($this->stderr);
    if (false === $latest) {
        return '';
    }
    return $latest;
}
RSS feed
Powered by Drupal