From 3321c9a8994e24467c3d78f6bb0045a0a0d9ba21 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Mon, 30 Jun 2014 15:51:18 -0400
Subject: [PATCH] Added error logging for unexpected exceptions. - Thanks to
 Tod Olson!

---
 module/VuFind/src/VuFind/Auth/Manager.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/module/VuFind/src/VuFind/Auth/Manager.php b/module/VuFind/src/VuFind/Auth/Manager.php
index 17c09615980..651518ef73f 100644
--- a/module/VuFind/src/VuFind/Auth/Manager.php
+++ b/module/VuFind/src/VuFind/Auth/Manager.php
@@ -463,7 +463,12 @@ class Manager implements ServiceLocatorAwareInterface
             // Pass password security exceptions through unmodified
             throw $e;
         } catch (\Exception $e) {
-            // Catch other exceptions and treat them as technical difficulties
+            // Catch other exceptions, log verbosely, and treat them as technical
+            // difficulties
+            error_log(
+                "Exception in " . get_class($this) . "::login: " . $e->getMessage()
+            );
+            error_log($e);
             throw new AuthException('authentication_error_technical');
         }
 
-- 
GitLab