Overview
| Artifact ID: | 1d1a8a574cac6a3cbee0aadf11c2c515b635e472 |
|---|---|
| Ticket: | 1649062fffffffffffffffffffffffffffffffff
incompat in ::errorInfo/::errorCode maintenance |
| User & Date: | dgp on 2007-06-09 10:59:52 |
Changes
- icomment:
Logged In: YES user_id=80530 Originator: NO I like to think that in Tcl 8.5, the variables ::errorInfo and ::errorCode themselves have become legacy features. And for legacy features we might as well keep as full legacy compat as we reasonably can. Since [catch] is extended to capture a dictionary of return options, there's no need to read post-catch info from ::errorInfo or ::errorCode; the same info is better retrieved from the return options dictionary. Similarly, since [interp bgerror] permits registration of a background error handler that gets passed the full return options dictionary, there's no need for such a handler to access such global variables any longer either. So, in my mind, the "right" way for scripts written for Tcl 8.5 to use the ::errorInfo and ::errorCode variables is not to use them. This means, that for me the best support for scripts that do use those variables is to maintain script-apparent consistency with how they worked in 8.4. Some patchwork, like this one, I don't really like much, and probably would not have done, except someone actually did notice the difference. I figure if someone noticed enough to log a report, someone else probably has scripts that depend on the difference and will suffer if we don't restore compat. Other similar examples are 1397843 and 1693252. I'd be happier if scripts did not exist that relied on such subtleties of the former implementation of maintenance of the ::errorCode and ::errorInfo variables, but exist they do, and keeping compat with their needs is easily enough done.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"