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

Breadcrumb

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

function ProcessStartFailedException::__construct

Overrides ProcessFailedException::__construct

File

vendor/symfony/process/Exception/ProcessStartFailedException.php, line 21

Class

ProcessStartFailedException
Exception for processes failed during startup.

Namespace

Symfony\Component\Process\Exception

Code

public function __construct(Process $process, ?string $message) {
    if ($process->isStarted()) {
        throw new InvalidArgumentException('Expected a process that failed during startup, but the given process was started successfully.');
    }
    $error = \sprintf('The command "%s" failed.' . "\n\nWorking directory: %s\n\nError: %s", $process->getCommandLine(), $process->getWorkingDirectory(), $message ?? 'unknown');
    // Skip parent constructor
    RuntimeException::__construct($error);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal