ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
InvalidKeyUsageException.php
Go to the documentation of this file.
1 <?php
2 
4 
7 
12  Throwable
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 }
Named exception for when a non-existent key-usage is given.
catch(Exception $e) $message
static getValidKeyUsages()
Returns the list of valid key usage options.
Definition: Key.php:53