ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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, Throwable $previous=null)
 A code 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
 
string $additional_info = ''
 

Static Protected Attributes

static array $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 61 of file class.arException.php.

References $additional_info, ILIAS\GlobalScreen\Provider\__construct(), and assignMessageToCode().

62  {
63  $this->code = $exception_code;
64  $this->additional_info = $additional_info;
65  $this->assignMessageToCode();
66  parent::__construct($this->message, $this->code);
67  }
string $additional_info
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

arException::__toString ( )
Returns
string

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

78  {
79  return implode('<br>', array(get_class($this), $this->message));
80  }

◆ assignMessageToCode()

arException::assignMessageToCode ( )
protected

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

References $additional_info, and $code.

Referenced by __construct().

69  : void
70  {
71  $this->message = 'ActiveRecord Exeption: ' . self::$message_strings[$this->code] . $this->additional_info;
72  }
string $additional_info
+ Here is the caller graph for this function:

Field Documentation

◆ $additional_info

string arException::$additional_info = ''
protected

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

Referenced by __construct(), and assignMessageToCode().

◆ $code

arException::$code = self::UNKNONWN_EXCEPTION
protected

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

Referenced by assignMessageToCode().

◆ $message

arException::$message = ''
protected

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

◆ $message_strings

array arException::$message_strings
staticprotected
Initial value:
= array(
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 35 of file class.arException.php.

◆ COLUMN_DOES_ALREADY_EXIST

const arException::COLUMN_DOES_ALREADY_EXIST = 1002

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

◆ COLUMN_DOES_NOT_EXIST

const arException::COLUMN_DOES_NOT_EXIST = 1001

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

Referenced by arConnectorDB\removeField().

◆ COPY_DESTINATION_ID_EXISTS

const arException::COPY_DESTINATION_ID_EXISTS = 1008

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

Referenced by ActiveRecord\copy().

◆ FIELD_UNKNOWN

const arException::FIELD_UNKNOWN = 1010

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

◆ GET_UNCACHED_OBJECT

const arException::GET_UNCACHED_OBJECT = 1004

Definition at line 28 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 31 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 30 of file class.arException.php.

◆ LIST_WRONG_LIMIT

const arException::LIST_WRONG_LIMIT = 1005

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

◆ PRIVATE_CONTRUCTOR

const arException::PRIVATE_CONTRUCTOR = 1009

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

◆ RECORD_NOT_FOUND

const arException::RECORD_NOT_FOUND = 1003

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

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

◆ UNKNONWN_EXCEPTION

const arException::UNKNONWN_EXCEPTION = -1

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

Referenced by ActiveRecord\returnDbTableName().


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