diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php index 5e4459bc40eba9bf11c84f4c1b1c0db6267075c1..8eb7d4944a1ff32877089714ccf3ce469f0ead08 100644 --- a/lib/SimpleSAML/Utilities.php +++ b/lib/SimpleSAML/Utilities.php @@ -587,6 +587,13 @@ class SimpleSAML_Utilities { // Log a error message SimpleSAML_Logger::error($_SERVER['PHP_SELF'].' - UserError: ErrCode:' . $error . ': ' . urlencode($emsg) ); + if (!empty($e)) { + SimpleSAML_Logger::error('Exception: ' . get_class($e)); + SimpleSAML_Logger::error('Backtrace:'); + foreach (explode("\n", $etrace) as $line) { + SimpleSAML_Logger::error($line); + } + } $languagefile = null; if (isset($errorcode)) $languagefile = 'errors';