You are here

class UserDeveloperConversionUserFieldDoesNotExistException in Apigee Edge 8

Thrown when source or destination field on user does not exist.

Hierarchy

Expanded class hierarchy of UserDeveloperConversionUserFieldDoesNotExistException

4 files declare their use of UserDeveloperConversionUserFieldDoesNotExistException
apigee_edge.module in ./apigee_edge.module
Copyright 2018 Google Inc.
DeveloperCreateUpdate.php in src/Job/DeveloperCreateUpdate.php
UserCreateUpdate.php in src/Job/UserCreateUpdate.php
UserDeveloperConverter.php in src/UserDeveloperConverter.php

File

src/Exception/UserDeveloperConversionUserFieldDoesNotExistException.php, line 26

Namespace

Drupal\apigee_edge\Exception
View source
class UserDeveloperConversionUserFieldDoesNotExistException extends UserDeveloperConversionException {

  /**
   * Name of the problematic field.
   *
   * @var string
   */
  protected $fieldName;

  /**
   * UserDeveloperConversionUserFieldDoesNotExistException constructor.
   *
   * @param string $field_name
   *   Name of the problematic field.
   * @param string $message
   *   The Exception message.
   * @param int|null $code
   *   The error code.
   * @param \Throwable|null $previous
   *   The previous throwable used for the exception chaining.
   */
  public function __construct(string $field_name, string $message = 'Field "@field" does not exist on user anymore.', ?int $code = NULL, ?\Throwable $previous = NULL) {
    $message = strtr($message, [
      '@field' => $field_name,
    ]);
    $this->fieldName = $field_name;
    parent::__construct($message, $code, $previous);
  }

  /**
   * Returns the name of the problematic field.
   *
   * @return string
   *   Name of the problematic field.
   */
  public function getFieldName() : string {
    return $this->fieldName;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UserDeveloperConversionUserFieldDoesNotExistException::$fieldName protected property Name of the problematic field.
UserDeveloperConversionUserFieldDoesNotExistException::getFieldName public function Returns the name of the problematic field.
UserDeveloperConversionUserFieldDoesNotExistException::__construct public function UserDeveloperConversionUserFieldDoesNotExistException constructor.