namespace eval ::foo {
    proc localexit { } {
        puts 1
        namespace delete ::foo
        error "Performing Local Exit" "Local Exit" LOCALEXIT
    }

    if { [catch {
        # your code goes here
        puts a
        puts b
        localexit
        puts c
    } err] } {
        if { [info exists errorCode] && $errorCode == "LOCALEXIT"} {
            puts exiting
        } else {
            error $errorInfo
        }
    }
}

You could probably do something like this, although I don't think it's
very elegant...


-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to