ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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...
 
- 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 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

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

References tranlateException().

22  {
23  $a_message = $this->tranlateException($a_code) . $a_message;
24  parent::__construct($a_message, $a_code);
25  }
+ Here is the call graph for this function:

Member Function Documentation

◆ tranlateException()

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

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

References $code.

Referenced by __construct().

32  {
33  $message = 'An undefined Database Exception occured';
34  switch ($code) {
35  case static::DB_GENERAL:
36  $message = 'An undefined Database Exception occured';
37  break;
38  }
39 
40  return $message . '. ';
41  }
$code
Definition: example_050.php:99
+ 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: