Re: catch replacing useful errorInfo



Donald G Porter wrote:

If you need to support Tcl 8.4 (or earlier):

package require Tcl 8.0
proc read_data {args} {
if {[catch {gen_data} msg]} {
error $msg $::errorInfo $::errorCode
}
}

Interesting. You advocate "error .." over "return -code error ...". Is there a technical reason or just a personal preference?


--
Bryan Oakley
http://www.tclscripting.com
.



Relevant Pages