Index: openacs-4/packages/acs-templating/tcl/parse-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/parse-procs.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/packages/acs-templating/tcl/parse-procs.tcl 17 Sep 2003 14:24:37 -0000 1.18 +++ openacs-4/packages/acs-templating/tcl/parse-procs.tcl 23 Sep 2003 14:33:59 -0000 1.19 @@ -695,7 +695,7 @@ return $name } -ad_proc -private template::get_attribute { tag params name { default "" } } { +ad_proc -private template::get_attribute { tag params name { default "ERROR" } } { Retrieves a named attribute value from the parameter set passed to a tag handler. If a default is not specified, assumes the attribute is required and throws an error. @@ -704,14 +704,16 @@ @param params The ns_set passed to the tag handler. @param name The name of the attribute. @param default A default value to return if the the attribute is - not specified in the template. + not specified in the template. A default value of + "ERROR" will cause the proc + to throw an error if the attribute wasn't supplied. @return The value of the attribute. } { set value [ns_set iget $params $name] if { [string equal $value {}] } { - if { [string equal $default {}] } { + if { [string equal $default {ERROR}] } { error "Missing [string toupper $name] property\ in [string toupper $tag] tag" } else {