From 66e503b21ddf6ec732050438673443a257da223e Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Mon, 9 Aug 2010 08:52:56 +0000 Subject: [PATCH] Session: Log error when save fails. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2504 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Session.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/SimpleSAML/Session.php b/lib/SimpleSAML/Session.php index ce285a2f4..c329415aa 100644 --- a/lib/SimpleSAML/Session.php +++ b/lib/SimpleSAML/Session.php @@ -838,7 +838,16 @@ class SimpleSAML_Session { $this->dirty = FALSE; $sh = SimpleSAML_SessionHandler::getSessionHandler(); - $sh->saveSession($this); + + try { + $sh->saveSession($this); + } catch (Exception $e) { + if (!($e instanceof SimpleSAML_Error_Exception)) { + $e = new SimpleSAML_Error_UnserializableException($e); + } + SimpleSAML_Logger::error('Unable to save session.'); + $e->logError(); + } } -- GitLab