class DeveloperToUserConversionException in Apigee Edge 8
Base exception class for developer to user conversion errors.
Hierarchy
- class \Drupal\apigee_edge\Exception\RuntimeException implements ApigeeEdgeExceptionInterface
- class \Drupal\apigee_edge\Exception\RuntimeException implements ApigeeEdgeExceptionInterface
- class \Drupal\apigee_edge\Exception\UserDeveloperConversionException implements ApigeeEdgeExceptionInterface
- class \Drupal\apigee_edge\Exception\DeveloperToUserConversionException
- class \Drupal\apigee_edge\Exception\UserDeveloperConversionException implements ApigeeEdgeExceptionInterface
- class \Drupal\apigee_edge\Exception\RuntimeException implements ApigeeEdgeExceptionInterface
Expanded class hierarchy of DeveloperToUserConversionException
File
- src/
Exception/ DeveloperToUserConversionException.php, line 28
Namespace
Drupal\apigee_edge\ExceptionView source
class DeveloperToUserConversionException extends UserDeveloperConversionException {
/**
* Developer object.
*
* @var \Drupal\apigee_edge\Entity\DeveloperInterface
*/
protected $developer;
/**
* DeveloperToUserConversionException constructor.
*
* @param \Drupal\apigee_edge\Entity\DeveloperInterface $developer
* Developer object.
* @param string $message
* The Exception message.
* @param int $code
* The error code.
* @param \Throwable|null $previous
* The previous throwable used for the exception chaining.
*/
public function __construct(DeveloperInterface $developer, string $message = 'Unable to convert "@developer" developer to user.', int $code = 0, ?\Throwable $previous = NULL) {
$this->developer = $developer;
$message = strtr($message, [
'@developer' => $developer
->getEmail(),
]);
parent::__construct($message, $code, $previous);
}
/**
* Returns the problematic developer.
*
* @return \Drupal\apigee_edge\Entity\DeveloperInterface
* Developer object.
*/
public function getDeveloper() : DeveloperInterface {
return $this->developer;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeveloperToUserConversionException:: |
protected | property | Developer object. | |
DeveloperToUserConversionException:: |
public | function | Returns the problematic developer. | |
DeveloperToUserConversionException:: |
public | function | DeveloperToUserConversionException constructor. | 2 |