From 2f87f3bc44206ab890d568f27f3e96a855fa8142 Mon Sep 17 00:00:00 2001 From: Neil Blakey-Milner Date: Wed, 23 Nov 2005 11:59:05 +0000 Subject: [PATCH] Accomodate (but not yet act on) exceptions/errors being passed through to errorRedirectTo and errorPage. --- lib/dispatcher.inc.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/dispatcher.inc.php b/lib/dispatcher.inc.php index db25878..643ef82 100644 --- a/lib/dispatcher.inc.php +++ b/lib/dispatcher.inc.php @@ -52,12 +52,15 @@ class KTDispatcher { $this->bTransactionStarted = false; } - function errorRedirectTo($event, $error_message, $sQuery = "") { + function errorRedirectTo($event, $error_message, $sQuery = "", $oException = null) { if ($this->bTransactionStarted) { $this->rollbackTransaction(); } $_SESSION['KTErrorMessage'][] = $error_message; + /* if ($oException) { + $_SESSION['Exception'][$error_message] = $oException; + }*/ $this->redirectTo($event, $sQuery); } @@ -210,11 +213,13 @@ class KTStandardDispatcher extends KTDispatcher { $this->oPage->render(); } - function errorPage($errorMessage) { + function errorPage($errorMessage, $oException = null) { if ($this->bTransactionStarted) { $this->rollbackTransaction(); } - $this->handleOutput($errorMessage); + $sOutput = $errorMessage; + $sOutput .= $oException->getString(); + $this->handleOutput($sOutput); exit(0); } } -- libgit2 0.21.4