You are here

public function AuthenticationKeyValueMalformedException::__construct in Apigee Edge 8

KeyValueMalformedException constructor.

We do not expose the name of problematic field by default in the message.

Parameters

string $problematic_field: Name of the field that caused the issue.

string $message: Exception message.

int $code: Error code.

\Throwable|null $previous: Previous exception.

File

src/Exception/AuthenticationKeyValueMalformedException.php, line 31

Class

AuthenticationKeyValueMalformedException
Defines an exception for when a key value is malformed.

Namespace

Drupal\apigee_edge\Exception

Code

public function __construct($problematic_field, $message = 'Apigee Edge API authentication key is malformed or not readable.', $code = 0, \Throwable $previous = NULL) {
  $this->problematicField = $problematic_field;
  $message = strtr($message, [
    '@field' => $problematic_field,
  ]);
  parent::__construct($message, $code, $previous);
}