File modules/util/exception/UIException.class.php
Last commit: Sun Mar 14 23:51:49 2021 +0100 Jan Dankert Refactoring: Using the ValidationException where possible.
1 <?php 2 3 namespace util\exception; 4 use Exception; 5 6 class UIException extends Exception 7 { 8 public $key; 9 10 public $params; 11 12 // Die Exception neu definieren, damit die Mitteilung nicht optional ist 13 public function __construct($key, $message, $params, Exception $previous = null) 14 { 15 16 $this->key = $key; 17 $this->params = $params; 18 19 // sicherstellen, dass alles korrekt zugewiesen wird 20 parent::__construct($message, 0, $previous); 21 } 22 23 // maßgeschneiderte Stringdarstellung des Objektes 24 public function __toString() 25 { 26 return __CLASS__ . ": " . $this->key . ": '{$this->message}' in {$this->file}({$this->line})\n" 27 . "{$this->getTraceAsString()}\n".($this->getPrevious()?'Caused by: '.$this->getPrevious()->__toString():''); 28 } 29 30 } 31 32 33 ?>
Downloadmodules/util/exception/UIException.class.php
History Sun, 14 Mar 2021 23:51:49 +0100 Jan Dankert Refactoring: Using the ValidationException where possible. Fri, 23 Oct 2020 07:44:23 +0200 Jan Dankert Fix: UIException must consider the previous exception. Sat, 29 Aug 2020 03:23:06 +0200 Jan Dankert Refactoring: Improved Exception-Handling; New: Generating pages using a page context which considers page aliases.