From 952539b1589b1cbd79d720d5eb6aaca95aca1626 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 25 Jul 2011 16:35:20 +0200 Subject: [PATCH] Merge pull request #37 from kurtextrem/master --- .../exception/SystemException.class.php | 300 +++++++++--------- 1 file changed, 153 insertions(+), 147 deletions(-) diff --git a/wcfsetup/install/files/lib/system/exception/SystemException.class.php b/wcfsetup/install/files/lib/system/exception/SystemException.class.php index 2be027dd53..b8034abfad 100644 --- a/wcfsetup/install/files/lib/system/exception/SystemException.class.php +++ b/wcfsetup/install/files/lib/system/exception/SystemException.class.php @@ -1,148 +1,154 @@ - - * @package com.woltlab.wcf - * @subpackage system.exception - * @category Community Framework - */ -class SystemException extends \Exception implements IPrintableException { - /** - * error description - * @var string - */ - protected $description = null; - - /** - * additional information - * @var string - */ - protected $information = ''; - - /** - * additional information - * @var string - */ - protected $functions = ''; - - /** - * Creates a new SystemException. - * - * @param string $message error message - * @param integer $code error code - * @param string $description description of the error - */ - public function __construct($message = '', $code = 0, $description = '') { - parent::__construct($message, $code); - $this->description = $description; - } - - /** - * Returns the description of this exception. - * - * @return string - */ - public function getDescription() { - return $this->description; - } - - /** - * Removes database password from stack trace. - * @see Exception::getTraceAsString() - */ - public function __getTraceAsString() { - $string = preg_replace('/Database->__construct\(.*\)/', 'Database->__construct(...)', $this->getTraceAsString()); - $string = preg_replace('/mysqli->mysqli\(.*\)/', 'mysqli->mysqli(...)', $string); - return $string; - } - - /** - * @see wcf\system\exception\IPrintableException::show() - */ - public function show() { - // send status code - @header('HTTP/1.1 503 Service Unavailable'); - - // print report - echo ''; - ?> - - - - -Fatal error: <?php echo StringUtil::encodeHTML($this->getMessage()); ?> - - - -
-

Fatal error: getMessage()); ?>

- -
-

getDescription(); ?>

- getCode()) { ?>

You get more information about the problem in the official WoltLab knowledge base: http://www.woltlab.com/help/?code=getCode()); ?>

- -

Information:

-

- error message: getMessage()); ?>
- error code: getCode()); ?>
- information; ?> - file: getFile()); ?> (getLine(); ?>)
- php version:
- wcf version:
- date:
- request:
- referer:
-

- -

Stacktrace:

-
__getTraceAsString()); ?>
-
- - functions; ?> -
- - - - + * @package com.woltlab.wcf + * @subpackage system.exception + * @category Community Framework + */ +class SystemException extends \Exception implements IPrintableException { + /** + * error description + * @var string + */ + protected $description = null; + + /** + * additional information + * @var string + */ + protected $information = ''; + + /** + * additional information + * @var string + */ + protected $functions = ''; + + /** + * Creates a new SystemException. + * + * @param string $message error message + * @param integer $code error code + * @param string $description description of the error + */ + public function __construct($message = '', $code = 0, $description = '') { + parent::__construct($message, $code); + $this->description = $description; + } + + /** + * Returns the description of this exception. + * + * @return string + */ + public function getDescription() { + return $this->description; + } + + /** + * Removes database password from stack trace. + * @see \Exception::getTraceAsString() + */ + public function __getTraceAsString() { + $string = preg_replace('/Database->__construct\(.*\)/', 'Database->__construct(...)', $this->getTraceAsString()); + $string = preg_replace('/mysqli->mysqli\(.*\)/', 'mysqli->mysqli(...)', $string); + return $string; + } + + /** + * @see wcf\system\exception\IPrintableException::show() + */ + public function show() { + // send status code + @header('HTTP/1.1 503 Service Unavailable'); + + // print report + echo ''; + + ?> + + + + + Fatal error: <?php echo StringUtil::encodeHTML($this->getMessage()); ?> + + + +
+

Fatal error: getMessage()); ?>

+ +
+

getDescription(); ?>

+ getCode()) { ?>

You get more information about the problem in the official WoltLab knowledge base: http://www.woltlab.com/help/?code=getCode()); ?>

+ +

Information:

+

+ error message: getMessage()); ?>
+ error code: getCode()); ?>
+ information; ?> + file: getFile()); ?> (getLine(); ?>)
+ php version:
+ wcf version:
+ date:
+ request:
+ referer:
+

+ +

Stacktrace:

+
__getTraceAsString()); ?>
+
+ + functions; ?> +
+ + + +