Revision: 1825
Author: olavmrk
Date: Wed Oct  7 02:11:40 2009
Log: SimpleSAML_Error_Error: Set exception message to error code.
http://code.google.com/p/simplesamlphp/source/detail?r=1825

Modified:
  /trunk/lib/SimpleSAML/Error/Error.php

=======================================
--- /trunk/lib/SimpleSAML/Error/Error.php       Sun Aug  3 22:44:37 2008
+++ /trunk/lib/SimpleSAML/Error/Error.php       Wed Oct  7 02:11:40 2009
@@ -36,6 +36,21 @@

                assert('is_string($errorCode) || is_array($errorCode)');

+               if (is_array($errorCode)) {
+                       $msg = $errorCode[0] . '(';
+                       foreach ($errorCode as $k => $v) {
+                               if ($k === 0) {
+                                       continue;
+                               }
+
+                               $msg .= var_export($k, TRUE) . ' => ' . 
var_export($v, TRUE) . ', ';
+                       }
+                       $msg = substr($msg, 0, -2) . ')';
+               } else {
+                       $msg = $errorCode;
+               }
+               parent::__construct($msg);
+
                $this->errorCode = $errorCode;
                $this->cause = $cause;
        }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/simplesamlphp-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to