summaryrefslogtreecommitdiff
path: root/manager/library/exception/exception.Base.php
diff options
context:
space:
mode:
Diffstat (limited to 'manager/library/exception/exception.Base.php')
-rw-r--r--manager/library/exception/exception.Base.php104
1 files changed, 52 insertions, 52 deletions
diff --git a/manager/library/exception/exception.Base.php b/manager/library/exception/exception.Base.php
index d7f2a2c..7120c37 100644
--- a/manager/library/exception/exception.Base.php
+++ b/manager/library/exception/exception.Base.php
@@ -14,84 +14,84 @@
* @version $Id: exception.Base.php 90 2010-03-09 09:48:27Z markus $
*/
class BaseException extends Exception {
- /**
- * additional data / string
- * @var string
- */
- protected $extra = '';
-
- /**
- * location of thrower
- * @var string
- */
- protected $exception_location = '';
+ /**
+ * additional data / string
+ * @var string
+ */
+ protected $extra = '';
+
+ /**
+ * location of thrower
+ * @var string
+ */
+ protected $exception_location = '';
/**
* make new object
*
- * @access public
+ * @access public
* @param string $message
* @param int $code
*/
public function __construct($message, $code = 0, $extra = '') {
$bt = debug_backtrace();
- $remove_exception = 0;
- while( $remove_exception < count($bt) && isset($bt[$remove_exception]['class']) && eregi('exception', $bt[$remove_exception]['class']) ) {
- $remove_exception++;
- }
+ $remove_exception = 0;
+ while( $remove_exception < count($bt) && isset($bt[$remove_exception]['class']) && eregi('exception', $bt[$remove_exception]['class']) ) {
+ $remove_exception++;
+ }
- if ($remove_exception > 0)
- $remove_exception--;
+ if ($remove_exception > 0)
+ $remove_exception--;
- if ($remove_exception < count($bt)) {
- $this->exception_location = $bt[$remove_exception]['file'].':'.$bt[$remove_exception]['line'];
- }
+ if ($remove_exception < count($bt)) {
+ $this->exception_location = $bt[$remove_exception]['file'].':'.$bt[$remove_exception]['line'];
+ }
- $this->extra = $extra;
+ $this->extra = $extra;
parent::__construct($message,$code);
}
/**
* Make a string out of this exception
- *
- * @access public
- * @return string
+ *
+ * @access public
+ * @return string
*/
- public function __toString() {
- $out = __CLASS__ . '['.$this->code.']:';
+ public function __toString() {
+ $out = __CLASS__ . '['.$this->code.']:';
- if ($this->exception_location != '')
- $out.= $this->exception_location;
- $out .= ':';
+ if ($this->exception_location != '')
+ $out.= $this->exception_location;
+ $out .= ':';
- $out .= " {$this->message}";
+ $out .= " {$this->message}";
- if (isset($this->extra) && strlen($this->extra) > 0)
- $out .= " ({$this->extra})\n";
+ if (isset($this->extra) && strlen($this->extra) > 0)
+ $out .= " ({$this->extra})\n";
return $out;
}
- /**
- * get the extra info string
- *
- * @access public
- * @return string
- */
- public function getExtraInfo() {
- return $this->extra;
- }
-
- /**
- * get the exception location string
- *
- * @access public
- * @return string
- */
- public function getExceptionLocation() {
- return $this->exception_location;
- }
+ /**
+ * get the extra info string
+ *
+ * @access public
+ * @return string
+ */
+ public function getExtraInfo() {
+ return $this->extra;
+ }
+
+ /**
+ * get the exception location string
+ *
+ * @access public
+ * @return string
+ */
+ public function getExceptionLocation() {
+ return $this->exception_location;
+ }
}