Resolved two issues related to exceptions
authorAlexander Ebert <ebert@woltlab.com>
Mon, 3 Mar 2014 00:56:56 +0000 (01:56 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 3 Mar 2014 00:56:56 +0000 (01:56 +0100)
wcfsetup/install/files/lib/system/exception/InvalidSecurityTokenException.class.php
wcfsetup/install/files/lib/system/exception/UserException.class.php

index bce56e1cc38de9b8c3e2a9689a5b3dcd470e2777..f17cf25746762a7b83c3934b440e4a3086c652bb 100644 (file)
@@ -12,7 +12,7 @@ use wcf\system\WCF;
  * @subpackage system.exception
  * @category   Community Framework
  */
-class InvalidSecurityTokenException extends UserException {
+class InvalidSecurityTokenException extends NamedUserException {
        /**
         * Creates a new InvalidSecurityTokenException object.
         */
index 1bc0a129eb387f9d497228b140a51c8e2234e020..e6c27b039f79f4e306c5fb4e5b9671052d524f14 100644 (file)
@@ -6,7 +6,7 @@ use wcf\system\WCF;
  * A UserException is thrown when a user gives invalid input data.
  * 
  * @author     Marcel Werk
- * @copyright  2001-2013 WoltLab GmbH
+ * @copyright  2001-2014 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @package    com.woltlab.wcf
  * @subpackage system.exception
@@ -24,4 +24,13 @@ abstract class UserException extends \Exception implements IPrintableException {
                        echo '<pre>' . $this->_getMessage() . '</pre>';
                }
        }
+       
+       /**
+        * Returns the exception's message, should be used to sanitize the output.
+        * 
+        * @return      string
+        */
+       protected function _getMessage() {
+               return $this->getMessage();
+       }
 }