Index: openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl,v diff -u -r1.69 -r1.70 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 18 Apr 2007 09:13:54 -0000 1.69 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 29 Aug 2007 12:59:34 -0000 1.70 @@ -13,81 +13,8 @@ package require base64 2.3.1 namespace eval acs_mail_lite { - #--------------------------------------- - ad_proc -public with_finally { - -code:required - -finally:required - } { - Execute CODE, then execute cleanup code FINALLY. - If CODE completes normally, its value is returned after - executing FINALLY. - If CODE exits non-locally (as with error or return), FINALLY - is executed anyway. - - @option code Code to be executed that could throw and error - @option finally Cleanup code to be executed even if an error occurs - } { - global errorInfo errorCode - - # Execute CODE. - set return_code [catch {uplevel $code} string] - set s_errorInfo $errorInfo - set s_errorCode $errorCode - - # As promised, always execute FINALLY. If FINALLY throws an - # error, Tcl will propagate it the usual way. If FINALLY contains - # stuff like break or continue, the result is undefined. - uplevel $finally - - switch $return_code { - 0 { - # CODE executed without a non-local exit -- return what it - # evaluated to. - return $string - } - 1 { - # Error - return -code error -errorinfo $s_errorInfo -errorcode $s_errorCode $string - } - 2 { - # Return from the caller. - return -code return $string - } - 3 { - # break - return -code break - } - 4 { - # continue - return -code continue - } - default { - return -code $return_code $string - } - } - } - - #--------------------------------------- - ad_proc -public get_package_id {} { - @returns package_id of this package - } { - return [apm_package_id_from_key acs-mail-lite] - } #--------------------------------------- - ad_proc -public get_parameter { - -name:required - {-default ""} - } { - Returns an apm-parameter value of this package - @option name parameter name - @option default default parameter value - @returns apm-parameter value of this package - } { - return [parameter::get -package_id [get_package_id] -parameter $name -default $default] - } - - #--------------------------------------- ad_proc -public parse_email_address { -email:required } {