ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
InvalidKeyUsageException.php
Go to the documentation of this file.
1<?php
2
4
7
11class InvalidKeyUsageException extends \InvalidArgumentException implements
13{
17 public function __construct($usage)
18 {
19 $message = sprintf(
20 'Invalid key usage given: "%s", usages "%s" allowed',
21 is_string($usage) ? $usage : gettype($usage),
22 implode('", "', Key::getValidKeyUsages())
23 );
24
25 parent::__construct($message);
26 }
27}
An exception for terminatinating execution or to throw for unit testing.
Named exception for when a non-existent key-usage is given.
Simple DTO wrapper for (X509) keys.
Definition: Key.php:13
static getValidKeyUsages()
Returns the list of valid key usage options.
Definition: Key.php:53
Interface \SAML2\Exception\ExceptionInterface.
Definition: Throwable.php:11
catch(Exception $e) $message