ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 }
__construct(string $a_message, int $a_code=self::DB_GENERAL)
__construct(Container $dic, ilPlugin $plugin)