- remove exception_handler property from Smarty class

- added Smarty's own exceptions SmartyException and SmartyCompilerException
This commit is contained in:
Uwe.Tews
2010-08-13 10:39:51 +00:00
parent cbc4205669
commit ad921936b0
17 changed files with 68 additions and 66 deletions
@@ -183,7 +183,7 @@ class Smarty_Internal_TemplateCompilerBase {
return $plugin_object->compile($args, $this);
}
}
throw new Exception("Plugin \"{$tag}\" not callable");
throw new SmartyException("Plugin \"{$tag}\" not callable");
} else {
if ($function = $this->getPlugin($tag, $plugin_type)) {
return $this->callTagCompiler('private_' . $plugin_type . '_plugin', $args, $tag, $function);
@@ -222,7 +222,7 @@ class Smarty_Internal_TemplateCompilerBase {
return $plugin_object->compile($args, $this);
}
}
throw new Exception("Plugin \"{$tag}\" not callable");
throw new SmartyException("Plugin \"{$tag}\" not callable");
}
}
$this->trigger_template_error ("unknown tag \"" . $tag . "\"", $this->lex->taglineno);
@@ -400,7 +400,7 @@ class Smarty_Internal_TemplateCompilerBase {
// output parser error message
$error_text .= ' - Unexpected "' . $this->lex->value . '", expected one of: ' . implode(' , ', $expect);
}
throw new Exception($error_text);
throw new SmartyCompilerException($error_text);
}
}