ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilDatabaseException Class Reference

Class ilDatabaseException. More...

+ Inheritance diagram for ilDatabaseException:
+ Collaboration diagram for ilDatabaseException:

Public Member Functions

 __construct ($a_message, $a_code=self::DB_GENERAL)
 ilDatabaseException constructor. More...
 
 __construct ($a_message, $a_code=0)
 A message isn't optional as in build in class Exception. More...
 

Data Fields

const DB_GENERAL = 10000
 

Protected Member Functions

 tranlateException ($code)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDatabaseException::__construct (   $a_message,
  $a_code = self::DB_GENERAL 
)

ilDatabaseException constructor.

Parameters
string$a_message
int$a_code

Reimplemented from ilException.

Definition at line 22 of file exception.ilDatabaseException.php.

23 {
24 $a_message = $this->tranlateException($a_code) . $a_message;
25 parent::__construct($a_message, $a_code);
26 }

References tranlateException().

+ Here is the call graph for this function:

Member Function Documentation

◆ tranlateException()

ilDatabaseException::tranlateException (   $code)
protected
Parameters
$code
Returns
string

Reimplemented in ilAtomQueryException.

Definition at line 33 of file exception.ilDatabaseException.php.

34 {
35 $message = 'An undefined Database Exception occured';
36 switch ($code) {
37 case static::DB_GENERAL:
38 $message = 'An undefined Database Exception occured';
39 break;
40 }
41
42 return $message . '. ';
43 }
$code
Definition: example_050.php:99
catch(Exception $e) $message

References $code, and $message.

Referenced by __construct().

+ Here is the caller graph for this function:

Field Documentation

◆ DB_GENERAL

const ilDatabaseException::DB_GENERAL = 10000

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