Skip to content
Snippets Groups Projects
Commit f3dc5580 authored by Olav Morken's avatar Olav Morken
Browse files

SimpleSAML_Error_Error: Set exception message to error code.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1825 44740490-163a-0410-bde0-09ae8108e29a
parent cf39a41c
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,21 @@ class SimpleSAML_Error_Error extends Exception {
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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment