19 declare(strict_types=1);
40 public function __construct(
int $exception_type, $additional_text =
"")
43 $this->
lng = $DIC->language();
57 switch ($this->exception_type) {
58 case self::TYPE_EXCEPTION:
59 $message = $this->
lng->txt(
'dcl_wrong_input_type');
61 case self::LENGTH_EXCEPTION:
62 $message = $this->
lng->txt(
'dcl_wrong_length');
64 case self::REGEX_EXCEPTION:
65 $message = $this->
lng->txt(
'dcl_wrong_regex');
67 case self::REGEX_CONFIG_EXCEPTION:
68 $message = $this->
lng->txt(
'dcl_invalid_regex_config');
70 case self::UNIQUE_EXCEPTION:
71 $message = $this->
lng->txt(
'dcl_unique_exception');
74 $message = $this->
lng->txt(
'dcl_noturl_exception');
77 $message = $this->
lng->txt(
'dcl_notimage_exception');
79 case self::WRONG_FILE_TYPE:
80 $message = $this->
lng->txt(
'dcl_not_supported_file_type');
82 case self::CUSTOM_MESSAGE:
85 $message = $this->
lng->txt(
'dcl_unknown_exception');
88 if (strlen($this->additional_text) > 0) {
__construct(Container $dic, ilPlugin $plugin)