From 918dcd1630438d1ae72e4f284faaff166359ec5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaime=20Pe=CC=81rez?= <jaime.perez@uninett.no>
Date: Wed, 29 Jun 2016 16:21:25 +0200
Subject: [PATCH] Add a new hook for exception handling.

In line with the previous commit, we now allow hooking in the exception handler, so that a module can implement its own logic to deal with certain exceptions.
---
 www/_include.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/www/_include.php b/www/_include.php
index 4772fbb47..3b8e056c9 100644
--- a/www/_include.php
+++ b/www/_include.php
@@ -37,6 +37,8 @@ SimpleSAML_Error_Assertion::installHandler();
 // show error page on unhandled exceptions
 function SimpleSAML_exception_handler(Exception $exception)
 {
+    SimpleSAML\Module::callHooks('exception_handler', $exception);
+
     if ($exception instanceof SimpleSAML_Error_Error) {
         $exception->show();
     } else {
-- 
GitLab