From acf697cd1bbc2749460332bd45ab098a4e367382 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Thu, 1 Mar 2012 22:02:42 +0100 Subject: Debug now toggleable in backend; used new STE features. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * If __DEBUG__ is true, STE will be in a more verbose mode. * Ratatöskr's frontend STETags now uses the \ste\RuntimeError exception This will also be Beta 3 --- ratatoeskr/frontend.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'ratatoeskr/frontend.php') diff --git a/ratatoeskr/frontend.php b/ratatoeskr/frontend.php index 57ada3f..7198c09 100644 --- a/ratatoeskr/frontend.php +++ b/ratatoeskr/frontend.php @@ -172,7 +172,7 @@ $ste->register_tag("articles_get", function($ste, $params, $sub) $lang = $ste->vars["language"]; if(!isset($params["var"])) - throw new Exception("Parameter var is needed in article_get!"); + throw new \ste\RuntimeError("Parameter var is needed in article_get!"); if(isset($params["section"])) { try @@ -253,7 +253,7 @@ $ste->register_tag("section_list", function($ste, $params, $sub) $default_section = $ratatoeskr_settings["default_section"]; if(!isset($params["var"])) - throw new Exception("Parameter var is needed in article_get!"); + throw new \ste\RuntimeException("Parameter var is needed in article_get!"); $result = Section::all(); @@ -295,7 +295,7 @@ $ste->register_tag("section_list", function($ste, $params, $sub) $ste->register_tag("article_comments_count", function($ste, $params, $sub) { if(!isset($params["article"])) - throw new Exception("Need parameter 'article' in ste:article_comments_count."); + throw new \ste\RuntimeException("Need parameter 'article' in ste:article_comments_count."); $tpl_article = $ste->get_var_reference($params["article"], False); $lang = $ste->vars["language"]; @@ -336,9 +336,9 @@ $ste->register_tag("article_comments_count", function($ste, $params, $sub) $ste->register_tag("article_comments", function($ste, $params, $sub) { if(!isset($params["var"])) - throw new Exception("Need parameter 'var' in ste:article_comments."); + throw new \ste\RuntimeException("Need parameter 'var' in ste:article_comments."); if(!isset($params["article"])) - throw new Exception("Need parameter 'article' in ste:article_comments."); + throw new \ste\RuntimeException("Need parameter 'article' in ste:article_comments."); $tpl_article = $ste->get_var_reference($params["article"], False); $lang = $ste->vars["language"]; @@ -410,7 +410,7 @@ $ste->register_tag("comment_form", function($ste, $params, $sub) { global $translation; if(!isset($params["article"])) - throw new Exception("Need parameter 'article' in ste:comment_form."); + throw new \ste\RuntimeException("Need parameter 'article' in ste:comment_form."); $tpl_article = $ste->get_var_reference($params["article"], False); if(isset($tpl_article["__obj"])) @@ -478,9 +478,9 @@ $ste->register_tag("page_prev", function($ste, $params, $sub) { global $translation; if(!isset($params["current"])) - throw new Exception("Need parameter 'current' in ste:page_prev."); + throw new \ste\RuntimeException("Need parameter 'current' in ste:page_prev."); if(!isset($params["maxpage"])) - throw new Exception("Need parameter 'maxpage' in ste:page_prev."); + throw new \ste\RuntimeException("Need parameter 'maxpage' in ste:page_prev."); if($params["current"] == 1) return ""; @@ -495,9 +495,9 @@ $ste->register_tag("page_next", function($ste, $params, $sub) { global $translation; if(!isset($params["current"])) - throw new Exception("Need parameter 'current' in ste:page_next."); + throw new \ste\RuntimeException("Need parameter 'current' in ste:page_next."); if(!isset($params["maxpage"])) - throw new Exception("Need parameter 'maxpage' in ste:page_next."); + throw new \ste\RuntimeException("Need parameter 'maxpage' in ste:page_next."); if($params["current"] == $params["maxpage"]) return ""; -- cgit v1.2.3-70-g09d2