ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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, Throwable $previous=null)
 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 20 of file exception.ilDatabaseException.php.

References ILIAS\GlobalScreen\Provider\__construct(), and tranlateException().

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

Member Function Documentation

◆ tranlateException()

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

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

References $message.

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  }
$message
Definition: xapiexit.php:14
+ 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: