[geeklog-cvs] geeklog: The template class should really trigger our error hand...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Oct 17 16:35:50 EDT 2009


changeset 7384:062fc7ef2c35
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/062fc7ef2c35
user: Dirk Haun <dirk at haun-online.de>
date: Sat Oct 17 19:54:49 2009 +0200
description:
The template class should really trigger our error handler instead of printing out error messages

diffstat:

 system/classes/template.class.php |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 2b8b42245059 -r 062fc7ef2c35 system/classes/template.class.php
--- a/system/classes/template.class.php	Sat Oct 17 14:09:44 2009 +0200
+++ b/system/classes/template.class.php	Sat Oct 17 19:54:49 2009 +0200
@@ -894,9 +894,11 @@
       $this->haltmsg($msg);
     }
 
+    /* we won't be coming back from haltmsg() in that case anyway
     if ($this->halt_on_error == 'yes') {
       die("<b>Halted.</b>");
     }
+    */
 
     return false;
   }
@@ -915,7 +917,11 @@
   * @see       halt
   */
   function haltmsg($msg) {
-    printf("<b>Template Error:</b> %s<br" . XHTML . ">\n", $msg);
+    if ($this->halt_on_error == 'yes') {
+      trigger_error(sprintf("Template Error: %s", $msg));
+    } else {
+      printf("<b>Template Error:</b> %s<br" . XHTML . ">\n", $msg);
+    }
   }
 
 }



More information about the geeklog-cvs mailing list