Login and auth classes added. WARNING: All class config entries must end with _class!
[shipsimu.git] / inc / classes / exceptions / class_FrameworkException.php
index b7f1c5bb2d1948a2b3764a0a38af9502cd4ce7de..2c403966037f736c9be75a5e2a37870ee8a6f04f 100644 (file)
@@ -44,7 +44,7 @@ abstract class FrameworkException extends ReflectionException {
                $message = (string) $message;
                $code    = (int)    $code;
 
-               // make sure everything is assigned properly
+               // Make sure everything is assigned properly
                parent::__construct($message, $code);
        }
 
@@ -78,11 +78,12 @@ abstract class FrameworkException extends ReflectionException {
        /**
         * Getter for hex-decimal code
         *
+        * @param       $code           Integer code to encode in hex
         * @return      $hexCode        The exception code in hex-decimal format
         */
-       public final function getHexCode () {
+       public final function getHexCode ($code = null) {
                // Get the decimal code
-               $code = $this->getCode();
+               if (is_null($code)) $code = $this->getCode();
 
                // Format it to hex-decimal, 0x as prefix and 3 chars
                $hexCode = sprintf("0x%03s", dechex($code));