ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDatabaseException Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 __construct (string $a_message, int $a_code=self::DB_GENERAL)
 
- 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 DB_GENERAL = 10000
 

Protected Member Functions

 tranlateException (int $code)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilDatabaseException

Author
Oskar Truffer ot@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

33  {
34  $a_message = $this->tranlateException($a_code) . $a_message;
35  parent::__construct($a_message, $a_code);
36  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ tranlateException()

ilDatabaseException::tranlateException ( int  $code)
protected

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

References $message.

Referenced by __construct().

39  : string
40  {
41  $message = 'An undefined Database Exception occured';
42  if ($code === static::DB_GENERAL) {
43  $message = 'An undefined Database Exception occured';
44  }
45 
46  return $message . '. ';
47  }
$message
Definition: xapiexit.php:32
+ Here is the caller graph for this function:

Field Documentation

◆ DB_GENERAL

const ilDatabaseException::DB_GENERAL = 10000

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


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