ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilWACException Class Reference

Class ilWACException. More...

+ Inheritance diagram for ilWACException:
+ Collaboration diagram for ilWACException:

Public Member Functions

 __construct ($code, $additional_message='')
 
- Public Member Functions inherited from ilException
 __construct ($a_message, $a_code=0)
 A message isn't optional as in build in class Exception. More...
 

Data Fields

const CODE_NO_TYPE = 9001
 
const CODE_NO_PATH = 9002
 
const ACCESS_WITHOUT_CHECK = 9003
 
const NO_CHECKING_INSTANCE = 9004
 
const WRONG_PATH_TYPE = 9005
 
const INITIALISATION_FAILED = 9006
 
const DATA_DIR_NON_WRITEABLE = 9007
 
const ACCESS_DENIED = 9010
 
const ACCESS_DENIED_NO_PUB = 9011
 
const ACCESS_DENIED_NO_LOGIN = 9012
 
const MAX_LIFETIME = 9013
 

Static Protected Attributes

static $messages
 

Private Member Functions

 isNonEmptyString ($text)
 Checks if the given text is empty or not. More...
 

Detailed Description

Class ilWACException.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
1.0.0

Definition at line 10 of file class.ilWACException.php.

Constructor & Destructor Documentation

◆ __construct()

ilWACException::__construct (   $code,
  $additional_message = '' 
)
Parameters
int$code
string$additional_message

Definition at line 44 of file class.ilWACException.php.

References $code, $message, $messages, and isNonEmptyString().

45  {
47 
48  if ($this->isNonEmptyString($additional_message)) {
49  $message = "\"{$this->message}\" with additional message: \"$additional_message\"";
50  }
51 
52  //ilWACLog::getInstance()->write('Exception in ' . $this->getFile() . ':' . $this->getLine() . ': ' . $message);
53  parent::__construct($message, $code);
54  }
$code
Definition: example_050.php:99
$messages
Definition: en.php:5
catch(Exception $e) $message
isNonEmptyString($text)
Checks if the given text is empty or not.
+ Here is the call graph for this function:

Member Function Documentation

◆ isNonEmptyString()

ilWACException::isNonEmptyString (   $text)
private

Checks if the given text is empty or not.

Parameters
string$textThe text which should be checked.
Returns
bool true if the string is not empty, otherwise false.

Definition at line 64 of file class.ilWACException.php.

References $text.

Referenced by __construct().

65  {
66  assert(is_string($text));
67 
68  return strcmp($text, '') !== 0;
69  }
$text
Definition: errorreport.php:18
+ Here is the caller graph for this function:

Field Documentation

◆ $messages

ilWACException::$messages
staticprotected
Initial value:
= array(
self::CODE_NO_TYPE => 'No type for Path-Signing selected',
self::WRONG_PATH_TYPE => 'This path-type cannot be signed',
self::CODE_NO_PATH => 'No path for checking available',
self::ACCESS_WITHOUT_CHECK => 'Resource could not be found',
self::NO_CHECKING_INSTANCE => 'This path is not secured by a class',
self::ACCESS_DENIED => 'Resource could not be found',
self::ACCESS_DENIED_NO_PUB => 'Resource could not be found',
self::INITIALISATION_FAILED => 'An error occured during your request. Please reload the page.',
self::DATA_DIR_NON_WRITEABLE => 'The SALT cannot be written to your /data directory. Please check the write permissions on the webserver.',
self::MAX_LIFETIME => 'You can only only use lifetimes shorter than ilWACSignedPath::MAX_LIFETIME',
)

Definition at line 26 of file class.ilWACException.php.

◆ ACCESS_DENIED

const ilWACException::ACCESS_DENIED = 9010

◆ ACCESS_DENIED_NO_LOGIN

const ilWACException::ACCESS_DENIED_NO_LOGIN = 9012

◆ ACCESS_DENIED_NO_PUB

◆ ACCESS_WITHOUT_CHECK

const ilWACException::ACCESS_WITHOUT_CHECK = 9003

◆ CODE_NO_PATH

const ilWACException::CODE_NO_PATH = 9002

◆ CODE_NO_TYPE

const ilWACException::CODE_NO_TYPE = 9001

Definition at line 12 of file class.ilWACException.php.

Referenced by ilWACSignedPath\buildTokenInstance().

◆ DATA_DIR_NON_WRITEABLE

const ilWACException::DATA_DIR_NON_WRITEABLE = 9007

Definition at line 18 of file class.ilWACException.php.

Referenced by ilWACToken\generateSaltFile().

◆ INITIALISATION_FAILED

const ilWACException::INITIALISATION_FAILED = 9006

Definition at line 17 of file class.ilWACException.php.

Referenced by ilWebAccessCheckerDelivery\handleRequest().

◆ MAX_LIFETIME

const ilWACException::MAX_LIFETIME = 9013

◆ NO_CHECKING_INSTANCE

const ilWACException::NO_CHECKING_INSTANCE = 9004

Definition at line 15 of file class.ilWACException.php.

Referenced by ilWebAccessCheckerDelivery\handleRequest().

◆ WRONG_PATH_TYPE

const ilWACException::WRONG_PATH_TYPE = 9005

Definition at line 16 of file class.ilWACException.php.

Referenced by ilWACSignedPath\getSignedPath().


The documentation for this class was generated from the following file: