ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
arException Class Reference

Class arException. More...

+ Inheritance diagram for arException:
+ Collaboration diagram for arException:

Public Member Functions

 __construct ($exception_code=self::UNKNONWN_EXCEPTION, $additional_info='')
 
 __toString ()
 
- 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 UNKNONWN_EXCEPTION = - 1
 
const COLUMN_DOES_NOT_EXIST = 1001
 
const COLUMN_DOES_ALREADY_EXIST = 1002
 
const RECORD_NOT_FOUND = 1003
 
const GET_UNCACHED_OBJECT = 1004
 
const LIST_WRONG_LIMIT = 1005
 
const LIST_ORDER_BY_WRONG_FIELD = 1006
 
const LIST_JOIN_ON_WRONG_FIELD = 1007
 
const COPY_DESTINATION_ID_EXISTS = 1008
 
const PRIVATE_CONTRUCTOR = 1009
 
const FIELD_UNKNOWN = 1010
 

Protected Member Functions

 assignMessageToCode ()
 

Protected Attributes

 $message = ''
 
 $code = self::UNKNONWN_EXCEPTION
 
 $additional_info = ''
 

Static Protected Attributes

static $message_strings
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

arException::__construct (   $exception_code = self::UNKNONWN_EXCEPTION,
  $additional_info = '' 
)
Parameters
int$exception_code
string$additional_info

Definition at line 57 of file class.arException.php.

References $additional_info, and assignMessageToCode().

57  {
58  $this->code = $exception_code;
59  $this->additional_info = $additional_info;
60  $this->assignMessageToCode();
61  parent::__construct($this->message, $this->code);
62  }
+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

arException::__toString ( )
Returns
string

Definition at line 73 of file class.arException.php.

References array.

73  {
74  return implode('<br>', array( get_class($this), $this->message ));
75  }
Create styles array
The data for the language used.

◆ assignMessageToCode()

arException::assignMessageToCode ( )
protected

Definition at line 65 of file class.arException.php.

References $additional_info, and $code.

Referenced by __construct().

65  {
66  $this->message = 'ActiveRecord Exeption: ' . self::$message_strings[$this->code] . $this->additional_info;
67  }
+ Here is the caller graph for this function:

Field Documentation

◆ $additional_info

arException::$additional_info = ''
protected

Definition at line 50 of file class.arException.php.

Referenced by __construct(), and assignMessageToCode().

◆ $code

arException::$code = self::UNKNONWN_EXCEPTION
protected

Definition at line 46 of file class.arException.php.

Referenced by assignMessageToCode().

◆ $message

arException::$message = ''
protected

Definition at line 42 of file class.arException.php.

◆ $message_strings

arException::$message_strings
staticprotected
Initial value:
self::UNKNONWN_EXCEPTION => 'Unknown Exception',
self::COLUMN_DOES_NOT_EXIST => 'Column does not exist:',
self::COLUMN_DOES_ALREADY_EXIST => 'Column does already exist:',
self::RECORD_NOT_FOUND => 'No Record found with PrimaryKey:',
self::GET_UNCACHED_OBJECT => 'Get uncached Object from Cache:',
self::LIST_WRONG_LIMIT => 'Limit, to value smaller than from value:',
self::LIST_JOIN_ON_WRONG_FIELD => 'Join on non existing field: ',
self::COPY_DESTINATION_ID_EXISTS => 'Copy Record: A record with the Destination-ID already exists.',
self::PRIVATE_CONTRUCTOR => 'Constructor cannot be accessed.',
self::FIELD_UNKNOWN => 'Field Unknown.',
)

Definition at line 27 of file class.arException.php.

◆ COLUMN_DOES_ALREADY_EXIST

const arException::COLUMN_DOES_ALREADY_EXIST = 1002

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

◆ COLUMN_DOES_NOT_EXIST

const arException::COLUMN_DOES_NOT_EXIST = 1001

Definition at line 14 of file class.arException.php.

◆ COPY_DESTINATION_ID_EXISTS

const arException::COPY_DESTINATION_ID_EXISTS = 1008

Definition at line 21 of file class.arException.php.

Referenced by ActiveRecord\copy().

◆ FIELD_UNKNOWN

const arException::FIELD_UNKNOWN = 1010

Definition at line 23 of file class.arException.php.

◆ GET_UNCACHED_OBJECT

const arException::GET_UNCACHED_OBJECT = 1004

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

Referenced by arObjectCache\get().

◆ LIST_JOIN_ON_WRONG_FIELD

const arException::LIST_JOIN_ON_WRONG_FIELD = 1007

Definition at line 20 of file class.arException.php.

Referenced by ActiveRecordList\join().

◆ LIST_ORDER_BY_WRONG_FIELD

const arException::LIST_ORDER_BY_WRONG_FIELD = 1006

Definition at line 19 of file class.arException.php.

◆ LIST_WRONG_LIMIT

const arException::LIST_WRONG_LIMIT = 1005

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

◆ PRIVATE_CONTRUCTOR

const arException::PRIVATE_CONTRUCTOR = 1009

Definition at line 22 of file class.arException.php.

◆ RECORD_NOT_FOUND

const arException::RECORD_NOT_FOUND = 1003

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

Referenced by ActiveRecord\findOrFail(), and ActiveRecord\read().

◆ UNKNONWN_EXCEPTION

const arException::UNKNONWN_EXCEPTION = - 1

Definition at line 13 of file class.arException.php.

Referenced by ActiveRecord\returnDbTableName().


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