You are here

class IndeterminateBundleException in Lightning Media 8.2

Same name and namespace in other branches
  1. 8.4 src/Exception/IndeterminateBundleException.php \Drupal\lightning_media\Exception\IndeterminateBundleException
  2. 8 src/Exception/IndeterminateBundleException.php \Drupal\lightning_media\Exception\IndeterminateBundleException
  3. 8.3 src/Exception/IndeterminateBundleException.php \Drupal\lightning_media\Exception\IndeterminateBundleException

Exception thrown if no bundle can be determined from an input value.

Hierarchy

Expanded class hierarchy of IndeterminateBundleException

4 files declare their use of IndeterminateBundleException
BulkUploadForm.php in modules/lightning_media_bulk_upload/src/Form/BulkUploadForm.php
EntityFormProxy.php in src/Plugin/EntityBrowser/Widget/EntityFormProxy.php
lightning_media.module in ./lightning_media.module
Core media asset support for Lightning.
MediaHelper.php in src/MediaHelper.php

File

src/Exception/IndeterminateBundleException.php, line 10

Namespace

Drupal\lightning_media\Exception
View source
class IndeterminateBundleException extends \UnexpectedValueException {

  /**
   * IndeterminateBundleException constructor.
   *
   * @param mixed $value
   *   The input value.
   * @param int $code
   *   (optional) The error code.
   * @param \Exception|NULL $previous
   *   (optional) The previous exception, if any.
   */
  public function __construct($value, $code = 0, \Exception $previous = NULL) {
    $message = sprintf('Could not match any bundles to input: %s', $value instanceof EntityInterface ? $value
      ->label() : var_export($value, TRUE));
    parent::__construct($message, $code, $previous);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
IndeterminateBundleException::__construct public function IndeterminateBundleException constructor.