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

Breadcrumb

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

function ConsoleErrorEvent::setExitCode

File

vendor/symfony/console/Event/ConsoleErrorEvent.php, line 46

Class

ConsoleErrorEvent
Allows to handle throwables thrown while running a command.

Namespace

Symfony\Component\Console\Event

Code

public function setExitCode(int $exitCode) : void {
    $this->exitCode = $exitCode;
    $r = new \ReflectionProperty($this->error, 'code');
    $r->setValue($this->error, $this->exitCode);
}

API Navigation

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