ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilSystemStyleExceptionBase.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25{
29 protected $message = '';
30
34 protected $code = -1;
35
36 protected string $add_info = '';
37
38 public function __construct(int $exception_code = -1, string $exception_info = '')
39 {
40 $this->code = $exception_code;
41 $this->add_info = $exception_info;
42 $this->assignMessageToCode();
43 parent::__construct($this->message, $this->code);
44 }
45
46 abstract protected function assignMessageToCode(): void;
47
48 public function __toString(): string
49 {
50 return get_class($this) . " '$this->message' in $this->file($this->line)\n"
51 . "{$this->getTraceAsString()}";
52 }
53}
Base class for ILIAS Exception handling.
Class for advanced editing exception handling in ILIAS.
__construct(int $exception_code=-1, string $exception_info='')
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc