Overview
| Artifact ID: | 359c59c1f3b1df6377739243067d782b63cbd941 |
|---|---|
| Ticket: | 1649062fffffffffffffffffffffffffffffffff
incompat in ::errorInfo/::errorCode maintenance |
| User & Date: | boakley on 2007-01-31 17:39:54 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
It appears that in 8.4.14 (I don't know about earlier versions...) "return -code error -errorcode xxx" doesn't work. The proper behavior (IMO) is seen in 8.5a4 FWIW. It is the "-errorcode xxx" part that doesn't seem to work. I expect to get the same results whether I use "return -code error" or "error" but I get different results on 8.4.14 with the following code (on Windows XP): proc main {} { foo return foo error } proc foo {what} { set ::errorCode NULL set ::errorInfo "" if {[catch { if {$what == "error"} { error \ "error reported via error" \ "custom errorInfo" \ [list CUSTOM errorCode] } else { return \ -code error \ -errorinfo "custom errorInfo" \ -errorcode [list CUSTOM errorCode] \ "error reported via return" } } err]} { puts $err: puts " errorCode: $::errorCode" puts " errorInfo: $::errorInfo" puts "" } } main exit 0 Here is what I get with 8.4.14: error reported via error: errorCode: CUSTOM errorCode errorInfo: custom errorInfo error reported via return: errorCode: NULL errorInfo: This is what I get with 8.5a4: error reported via error: errorCode: CUSTOM errorCode errorInfo: custom errorInfo error reported via return: errorCode: CUSTOM errorCode errorInfo: custom errorInfo - foundin changed to: "obsolete: 8.4.14"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "boakley"
- subsystem changed to: "18. Commands M-Z"
- title changed to:
return -code error -errorcode xxx doesn't seem to work right
- type changed to: "Bug"