ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
exception.ilDatabaseException.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
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 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(string $a_message, int $a_code=self::DB_GENERAL)
__construct(Container $dic, ilPlugin $plugin)
$message
Definition: xapiexit.php:32