You are here

class KeyGenerationException in Lightning API 8.3

Same name and namespace in other branches
  1. 8.4 src/Exception/KeyGenerationException.php \Drupal\lightning_api\Exception\KeyGenerationException
  2. 8 src/Exception/KeyGenerationException.php \Drupal\lightning_api\Exception\KeyGenerationException
  3. 8.2 src/Exception/KeyGenerationException.php \Drupal\lightning_api\Exception\KeyGenerationException

Exception thrown if an error occurs while generating an OAuth key pair.

Hierarchy

  • class \Drupal\lightning_api\Exception\KeyGenerationException extends \Drupal\lightning_api\Exception\RuntimeException

Expanded class hierarchy of KeyGenerationException

2 files declare their use of KeyGenerationException
OAuthKey.php in src/OAuthKey.php
OAuthKeyForm.php in src/Form/OAuthKeyForm.php

File

src/Exception/KeyGenerationException.php, line 8

Namespace

Drupal\lightning_api\Exception
View source
class KeyGenerationException extends \RuntimeException {

  /**
   * KeyGenerationException constructor.
   *
   * @param string $message
   *   (optional) The exception message.
   * @param int $code
   *   (optional) The exception error code.
   * @param \Exception $previous
   *   (optional) The previous exception, if any.
   */
  public function __construct($message = "", $code = 0, \Exception $previous = NULL) {
    if (empty($message)) {
      $message = openssl_error_string() ?: 'An internal error occurred';
    }
    parent::__construct($message, $code, $previous);
  }

}

Members

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