ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
exception.ilDatabaseException.php
Go to the documentation of this file.
1<?php
2
10{
11 const DB_GENERAL = 10000;
12
13
20 public function __construct($a_message, $a_code = self::DB_GENERAL)
21 {
22 $a_message = $this->tranlateException($a_code) . $a_message;
23 parent::__construct($a_message, $a_code);
24 }
25
26
31 protected function tranlateException($code)
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 }
42}
An exception for terminatinating execution or to throw for unit testing.
Class ilDatabaseException.
__construct($a_message, $a_code=self::DB_GENERAL)
ilDatabaseException constructor.
Base class for ILIAS Exception handling.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$message
Definition: xapiexit.php:14