ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilWACException.php
Go to the documentation of this file.
1<?php
2
26{
27 public const CODE_NO_TYPE = 9001;
28 public const CODE_NO_PATH = 9002;
29 public const ACCESS_WITHOUT_CHECK = 9003;
30 public const NO_CHECKING_INSTANCE = 9004;
31 public const WRONG_PATH_TYPE = 9005;
32 public const INITIALISATION_FAILED = 9006;
33 public const DATA_DIR_NON_WRITEABLE = 9007;
34 public const ACCESS_DENIED = 9010;
35 public const ACCESS_DENIED_NO_PUB = 9011;
36 public const ACCESS_DENIED_NO_LOGIN = 9012;
37 public const MAX_LIFETIME = 9013;
38 public const NOT_FOUND = 9014;
42 protected static array $messages = [
43 self::CODE_NO_TYPE => 'No type for Path-Signing selected',
44 self::WRONG_PATH_TYPE => 'This path-type cannot be signed',
45 self::CODE_NO_PATH => 'No path for checking available',
46 self::ACCESS_WITHOUT_CHECK => 'Resource could not be found',
47 self::NO_CHECKING_INSTANCE => 'This path is not secured by a class',
48 self::ACCESS_DENIED => 'Resource could not be found',
49 self::ACCESS_DENIED_NO_PUB => 'Resource could not be found',
50 self::INITIALISATION_FAILED => 'An error occured during your request. Please reload the page.',
51 self::DATA_DIR_NON_WRITEABLE => 'The SALT cannot be written to your /data directory. Please check the write permissions on the webserver.',
52 self::MAX_LIFETIME => 'You can only only use lifetimes shorter than ilWACSignedPath::MAX_LIFETIME',
53 self::ACCESS_DENIED_NO_LOGIN => 'No Login found',
54 self::NOT_FOUND => 'Resource not Found',
55 ];
56
57
62 public function __construct($code, $additional_message = '')
63 {
64 $message = self::$messages[$code] ?? 'Unknown error';
65 if (!empty($additional_message)) {
66 $message .= ': ' . $additional_message;
67 }
69 }
70}
Base class for ILIAS Exception handling.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct($code, $additional_message='')
static array $messages
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$messages
Definition: xapiexit.php:21
$message
Definition: xapiexit.php:31