ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilWACException.php
Go to the documentation of this file.
1 <?php
2 require_once('./Services/Exceptions/classes/class.ilException.php');
3 
10 class ilWACException extends ilException {
11 
12  const CODE_NO_TYPE = 9001;
13  const CODE_NO_PATH = 9002;
14  const ACCESS_WITHOUT_CHECK = 9003;
15  const NO_CHECKING_INSTANCE = 9004;
16  const WRONG_PATH_TYPE = 9005;
17  const INITIALISATION_FAILED = 9006;
18  const DATA_DIR_NON_WRITEABLE = 9007;
19  const ACCESS_DENIED = 9010;
20  const ACCESS_DENIED_NO_PUB = 9011;
21  const ACCESS_DENIED_NO_LOGIN = 9012;
22  const MAX_LIFETIME = 9013;
26  protected static $messages = array(
27  self::CODE_NO_TYPE => 'No type for Path-Signing selected',
28  self::WRONG_PATH_TYPE => 'This path-type cannot be signed',
29  self::CODE_NO_PATH => 'No path for checking available',
30  self::ACCESS_WITHOUT_CHECK => 'the requested file cannot be delivered since it is not checked yet',
31  self::NO_CHECKING_INSTANCE => 'This path is not secured by a class',
32  self::ACCESS_DENIED => 'ACCESS DENIED: The requested file cannot be delivered.',
33  self::ACCESS_DENIED_NO_PUB => 'ACCESS DENIED: Public Access is not activated on this installation. Please log in.',
34  self::INITIALISATION_FAILED => 'An error occured during your request. Please reload the page.',
35  self::DATA_DIR_NON_WRITEABLE => 'The SALT cannot be written to your /data directory. Please check the write permissions on the webserver.',
36  self::MAX_LIFETIME => 'You can only only use lifetimes shorter than ilWACSignedPath::MAX_LIFETIME',
37  self::ACCESS_DENIED_NO_LOGIN => 'ACCESS DENIED: No login.',
38  );
39 
40 
45  public function __construct($code, $additional_message = '') {
46  $message = self::$messages[$code];
47  if ($additional_message) {
48  $message = $message . ': ' . $additional_message;
49  }
50  ilWACLog::getInstance()->write('Exception in ' . $this->getFile() . ':' . $this->getLine() . ': ' . $message);
51  parent::__construct($message, $code);
52  }
53 }
54 
55 ?>
__construct($code, $additional_message='')
Base class for ILIAS Exception handling.
Class ilWACException.
$code
Definition: example_050.php:99
static getInstance()
$messages
Definition: en-x-test.php:7