commit 3375cfc2c4b0a5efc1451e27ed1270aff773be61
parent 8ef06f6bada75b8fecb9d38f039264bc8ca844d3
Author: Jan Dankert <devnull@localhost>
Date: Tue, 3 Jan 2017 22:19:11 +0100
OpenRatException in eigene Datei ausgelagert.
Diffstat:
3 files changed, 27 insertions(+), 21 deletions(-)
diff --git a/db/db.class.php b/db/db.class.php
@@ -431,25 +431,4 @@ class DB
}
-class OpenRatException extends Exception
-{
- public $key;
-
- // Die Exception neu definieren, damit die Mitteilung nicht optional ist
- public function __construct($key, $message, $code = 0, Exception $previous = null) {
-
- $this->key = $key;
-
- // sicherstellen, dass alles korrekt zugewiesen wird
- parent::__construct($message, $code, $previous);
- }
-
- // maßgeschneiderte Stringdarstellung des Objektes
- public function __toString() {
- return __CLASS__ . ": ".$this->key." [{$this->code}]: '{$this->message}' in {$this->file}({$this->line})\n"
- . "{$this->getTraceAsString()}\n";
- }
-
-}
-
?>
\ No newline at end of file
diff --git a/util/OpenRatException.class.php b/util/OpenRatException.class.php
@@ -0,0 +1,25 @@
+<?php
+
+class OpenRatException extends Exception
+{
+ public $key;
+
+ // Die Exception neu definieren, damit die Mitteilung nicht optional ist
+ public function __construct($key, $message, $code = 0, Exception $previous = null) {
+
+ $this->key = $key;
+
+ // sicherstellen, dass alles korrekt zugewiesen wird
+ parent::__construct($message, $code, $previous);
+ }
+
+ // maßgeschneiderte Stringdarstellung des Objektes
+ public function __toString() {
+ return __CLASS__ . ": ".$this->key." [{$this->code}]: '{$this->message}' in {$this->file}({$this->line})\n"
+ . "{$this->getTraceAsString()}\n";
+ }
+
+}
+
+
+?>+
\ No newline at end of file
diff --git a/util/include.inc.php b/util/include.inc.php
@@ -11,6 +11,7 @@ require_once( OR_SERVICECLASSES_DIR."Preferences.class.".PHP_EXT );
require_once( OR_SERVICECLASSES_DIR."FileUtils.class.".PHP_EXT );
require_once( OR_SERVICECLASSES_DIR."JSON.class.".PHP_EXT );
require_once( OR_SERVICECLASSES_DIR."Password.class.".PHP_EXT );
+require_once( OR_SERVICECLASSES_DIR."OpenRatException.class.".PHP_EXT );
//if ( !empty($REQ[REQ_PARAM_ACTION]) && in_array($REQ[REQ_PARAM_ACTION],array('tree')) )