Code sync from ship-simu code (all class config entries must end with _class!)
[mailer.git] / inc / classes / exceptions / class_FrameworkException.php
index b7db9a34d639f6d45751144c9f0821de1391cd30..2c403966037f736c9be75a5e2a37870ee8a6f04f 100644 (file)
@@ -8,7 +8,7 @@
  * @version            0.0.0
  * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.ship-simu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -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));