aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/frontend.php
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2012-03-01 22:02:42 +0100
committerKevin Chabowski <kevin@kch42.de>2012-03-01 22:02:42 +0100
commitacf697cd1bbc2749460332bd45ab098a4e367382 (patch)
tree90dfdf4ea722f964732e1ca612aa2a742250a175 /ratatoeskr/frontend.php
parenta940213bc467fce611854002e15b05fef5a0d3c8 (diff)
downloadratatoeskr-cms-acf697cd1bbc2749460332bd45ab098a4e367382.tar.gz
ratatoeskr-cms-acf697cd1bbc2749460332bd45ab098a4e367382.tar.bz2
ratatoeskr-cms-acf697cd1bbc2749460332bd45ab098a4e367382.zip
Debug now toggleable in backend; used new STE features.
* 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
Diffstat (limited to 'ratatoeskr/frontend.php')
-rw-r--r--ratatoeskr/frontend.php20
1 files changed, 10 insertions, 10 deletions
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 "";