ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
exception.ilDatabaseException.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
28{
29 public const DB_GENERAL = 10000;
30
31
32 public function __construct(string $a_message, int $a_code = self::DB_GENERAL)
33 {
34 $a_message = $this->tranlateException($a_code) . $a_message;
35 parent::__construct($a_message, $a_code);
36 }
37
38
39 protected function tranlateException(int $code): 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 }
48}
Class ilDatabaseException.
__construct(string $a_message, int $a_code=self::DB_GENERAL)
Base class for ILIAS Exception handling.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$message
Definition: xapiexit.php:31