- 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

View File

@@ -64,7 +64,7 @@ function smarty_function_html_image($params, $smarty, $template)
if (!is_array($_val)) {
$$_key = smarty_function_escape_special_chars($_val);
} else {
throw new Exception ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
}
break;
@@ -78,7 +78,7 @@ function smarty_function_html_image($params, $smarty, $template)
if (!is_array($_val)) {
$extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"';
} else {
throw new Exception ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
}
break;
}
@@ -136,4 +136,4 @@ function smarty_function_html_image($params, $smarty, $template)
return $prefix . '<img src="' . $path_prefix . $file . '" alt="' . $alt . '" width="' . $width . '" height="' . $height . '"' . $extra . ' />' . $suffix;
}
?>
?>