From ee16001ef6495c0e676ba832dca567f88d2da42d Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Wed, 7 Jul 2010 08:22:44 +0000 Subject: [PATCH] Session: Log exception when failing to initialize session. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2383 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Session.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/SimpleSAML/Session.php b/lib/SimpleSAML/Session.php index ad4f27a6d..3861b1913 100644 --- a/lib/SimpleSAML/Session.php +++ b/lib/SimpleSAML/Session.php @@ -163,6 +163,12 @@ class SimpleSAML_Session { try { self::$instance = self::loadSession(); } catch (Exception $e) { + if ($e instanceof SimpleSAML_Error_Exception) { + SimpleSAML_Logger::error('Error loading session:'); + $e->logError(); + } else { + SimpleSAML_Logger::error('Error loading session: ' . $e->getMessage()); + } /* For some reason, we were unable to initialize this session. Use a transient session instead. */ self::useTransientSession(); return self::$instance; -- GitLab