* A logged exceptions prevents information disclosures and provides an easy
* way to log errors.
*
- * @author Tim DΓΌsterhus, Alexander Ebert
- * @copyright 2001-2012 WoltLab GmbH
+ * @author Tim Duesterhus, Alexander Ebert
+ * @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
* @subpackage system.exception
* @category Community Framework
*/
class LoggedException extends \Exception {
+ /**
+ * ignore disabled debug mode
+ * @var boolean
+ */
+ protected $ignoreDebugMode = false;
+
/**
* @see \Exception::getMessage()
*/
public function _getMessage() {
// suppresses the original error message
- if (!WCF::debugModeIsEnabled()) {
+ if (!WCF::debugModeIsEnabled() && !$this->ignoreDebugMode) {
return 'An error occured. Sorry.';
}
* NamedUserException shows a (well) styled page with the given error message.
*
* @author Marcel Werk
- * @copyright 2001-2012 WoltLab GmbH
+ * @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
* @subpackage system.exception
* @category Community Framework
*/
class NamedUserException extends UserException {
+ /**
+ * @see wcf\system\exception\LoggedException::$ignoreDebugMode
+ */
+ protected $ignoreDebugMode = true;
+
/**
* Shows a styled page with the given error message.
*/