From c513ca543a557484240996d5021c5c012d030924 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Sun, 10 Jun 2018 12:33:41 +0000 Subject: [PATCH] Add error filename/number and context when available to ease debugging. --- www/_include.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/_include.php b/www/_include.php index a1bbe0e98..78451ee31 100644 --- a/www/_include.php +++ b/www/_include.php @@ -53,7 +53,8 @@ function SimpleSAML_error_handler($errno, $errstr, $errfile = null, $errline = 0 } // show an error with a full backtrace - $e = new \SimpleSAML\Error\Exception('Error '.$errno.' - '.$errstr); + $context = (is_null($errfile)?'':" at $errfile:$errline") . (is_null($errcontext)?'':" $errcontext"); + $e = new \SimpleSAML\Error\Exception('Error '.$errno.' - '.$errstr . $context); $e->logError(); // resume normal error processing -- GitLab