ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilSystemStyleExceptionBase.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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 }
__construct(int $exception_code=-1, string $exception_info='')
__construct(Container $dic, ilPlugin $plugin)
Class for advanced editing exception handling in ILIAS.