19 declare(strict_types=1);
69 public function __construct(
int $exception_code = -1,
string $exception_info =
"")
71 $this->add_info = $exception_info;
72 $this->code = $exception_code;
79 switch ($this->code) {
80 case self::ARRAY_EXPECTED:
83 case self::STRING_EXPECTED:
86 case self::INVALID_TYPE:
89 case self::EMPTY_STRING:
93 case self::EMPTY_ENTRY:
96 case self::INVALID_MANDATORY_ENTRY_ATTRIBUTE:
97 $this->message =
"Invalid mandatory entry Attribute: " .
$this->add_info;
99 case self::DUPLICATE_ENTRY:
100 $this->message =
"There are entries with the same ID. Duplicate: " .
$this->add_info;
102 case self::DUPLICATE_ROOT_ENTRY:
103 $this->message =
"There are multiple root entry. Duplicate: " .
$this->add_info;
105 case self::INVALID_ID:
108 case self::ENTRY_WITH_NO_YAML_DESCRIPTION:
109 $this->message =
"No YAML Description found for Entry returned by: '" . $this->add_info .
110 "' (check if the entry is properly introduced and closed with '---' before return statement)";
112 case self::ENTRY_WITH_NO_VALID_RETURN_STATEMENT:
113 $this->message =
"No Return statement given for Entry: " .
$this->add_info;
115 case self::PARSING_YAML_ENTRY_FAILED:
118 case self::ENTRY_TITLE_MISSING:
119 $this->message =
"Entry Title missing (check if valid function name is set for all entries): " .
$this->add_info;
121 case self::ENTRY_WITHOUT_FUNCTION:
125 case self::INVALID_FILE_PATH:
126 $this->message =
"Invalid file path or file not readable: " .
$this->add_info;
128 case self::FILE_CREATION_FAILED:
131 case self::FOLDER_CREATION_FAILED:
134 case self::FOLDER_DELETION_FAILED:
137 case self::FILE_DELETION_FAILED:
140 case self::LESS_COMPILE_FAILED:
143 case self::FILE_OPENING_FAILED:
147 case self::INVALID_INDEX:
150 case self::MISSING_INDEX:
153 case self::CRAWL_MAX_NESTING_REACHED:
154 $this->message =
"Max nesting reached while crowling (Factories might contain a circle), info: " .
$this->add_info;
157 case self::UNKNOWN_EXCEPTION:
168 " '$this->message' in $this->file($this->line)\n" .
169 "{$this->getTraceAsString()}" const LESS_COMPILE_FAILED
const PARSING_YAML_ENTRY_FAILED
const FOLDER_CREATION_FAILED
const INVALID_RULES_ENTRY
const ENTRY_WITHOUT_FUNCTION
__construct(int $exception_code=-1, string $exception_info="")
ilKitchenSinkException constructor.
const ENTRY_WITH_NO_YAML_DESCRIPTION
const ENTRY_TITLE_MISSING
const FOLDER_DELETION_FAILED
const FILE_CREATION_FAILED
const CRAWL_MAX_NESTING_REACHED
const INVALID_MANDATORY_ENTRY_ATTRIBUTE
const FILE_DELETION_FAILED
__construct(Container $dic, ilPlugin $plugin)
const DUPLICATE_ROOT_ENTRY
const ENTRY_WITH_NO_VALID_RETURN_STATEMENT
const FILE_OPENING_FAILED