You are here

public function InvalidOauth2ClientException::__construct in OAuth2 Client 8.2

Same name and namespace in other branches
  1. 8.3 src/Exception/InvalidOauth2ClientException.php \Drupal\oauth2_client\Exception\InvalidOauth2ClientException::__construct()

Constructs an InvalidOauth2ClientException object.

Parameters

string $invalidClientId: The passed Oauth2 Client ID that was found to be invalid.

string $message: The Exception message to throw.

int $code: The Exception code.

\Throwable $previous: The previous exception used for the exception chaining.

File

src/Exception/InvalidOauth2ClientException.php, line 22

Class

InvalidOauth2ClientException
Exception thrown when trying to retrieve a non-existent OAuth2 Client.

Namespace

Drupal\oauth2_client\Exception

Code

public function __construct($invalidClientId, $message = "", $code = 0, \Throwable $previous = NULL) {
  if ($message == "") {
    if (is_scalar($invalidClientId)) {
      $message = "The OAuth2 Client plugin '" . $invalidClientId . "' does not exist";
    }
    else {
      $message = 'An invalid value was passed for the OAuth2 Plugin ID';
    }
  }
  parent::__construct($message, $code, $previous);
}