You are here

class UpdateException in Automatic Updates 8.2

Defines a custom exception for a failure during an update.

Hierarchy

  • class \Drupal\automatic_updates\Exception\UpdateException extends \Drupal\automatic_updates\Exception\RuntimeException

Expanded class hierarchy of UpdateException

4 files declare their use of UpdateException
BatchProcessor.php in src/BatchProcessor.php
TestController.php in tests/modules/automatic_updates_test/src/TestController.php
Updater.php in src/Updater.php
UpdaterFormTest.php in tests/src/Functional/UpdaterFormTest.php

File

src/Exception/UpdateException.php, line 8

Namespace

Drupal\automatic_updates\Exception
View source
class UpdateException extends \RuntimeException {

  /**
   * The validation results for the exception.
   *
   * @var \Drupal\automatic_updates\Validation\ValidationResult[]
   */
  protected $validationResults;

  /**
   * Constructs an UpdateException object.
   *
   * @param \Drupal\automatic_updates\Validation\ValidationResult[] $validation_results
   *   The validation results.
   * @param string $message
   *   The exception message.
   */
  public function __construct(array $validation_results, string $message) {
    parent::__construct($message);
    $this->validationResults = $validation_results;
  }

  /**
   * Gets the validation results for the exception.
   *
   * @return \Drupal\automatic_updates\Validation\ValidationResult[]
   *   The validation results.
   */
  public function getValidationResults() : array {
    return $this->validationResults;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UpdateException::$validationResults protected property The validation results for the exception.
UpdateException::getValidationResults public function Gets the validation results for the exception.
UpdateException::__construct public function Constructs an UpdateException object.