Skip to content
Tcl Source Code Artifact [e22975eee7]
Login

Artifact [e22975eee7]

Artifact e22975eee728270c31a21c69889674ef7d908d8c:

Ticket change [e22975eee7] - New ticket [2038069fffffffff|2038069fff] <i>Too much errorinfo at catch</i>. by lars_h on 2008-08-04 21:42:19.
D 2008-08-04T21:42:19
J assignee msofer
J cmimetype text/plain
J comment This\sis\san\sissue\swhere\sa\sbytecompiled\s[catch]\sbehaves\sdifferently\sfrom\san\sinterpreted\s[catch].\sIt\sis\spresent\sin\s8.5,\stoday's\sCVS\sHEAD\s(8.6a1\swith\sNRE),\sand\sat\sleast\s8.4\stoo\s(haven't\schecked\swith\sany\s8.3\sor\searlier).\n\nThe\sissue\sis\sprobably\sclearest\sin\s8.5\s(this\sis\s.0):\n\n%\sproc\scompiled\s{prefix\sscript}\s{list\s[catch\s[lappend\sprefix\s$script]\sres\sinfo]\s$res\s$info}\n%\sproc\sinterpreted\s{prefix\sscript}\s{list\s[eval\s{catch\s[lappend\sprefix\s$script]\sres\sinfo}]\s$res\s$info}\n\n(Same\scode,\sexcept\sfor\sthe\s[eval]\saround\sthe\s[catch]\sin\sthe\slatter.\sChanging\sthe\scommand\ssubstitution\sto\sa\svariable\ssubstitution\sdid\snot\sseem\sto\smake\sa\sdifference.)\n\n%\scompiled\s{uplevel\s#0}\s{error\sFOO}\n1\sFOO\s{-code\s1\s-level\s0\s-errorcode\sNONE\s-errorinfo\s{FOO\n\s\s\s\swhile\sexecuting\n"error\sFOO"\n\s\s\s\s("uplevel"\sbody\sline\s1)\n\s\s\s\sinvoked\sfrom\swithin\n"uplevel\s#0\s{error\sFOO}"\n\s\s\s\sinvoked\sfrom\swithin\n"catch\s[lappend\sprefix\s$script]\sres\sinfo"}\s-errorline\s1}\n\n%\sinterpreted\s{uplevel\s#0}\s{error\sFOO}\n1\sFOO\s{-code\s1\s-level\s0\s-errorcode\sNONE\s-errorinfo\s{FOO\n\s\s\s\swhile\sexecuting\n"error\sFOO"\n\s\s\s\s("uplevel"\sbody\sline\s1)\n\s\s\s\sinvoked\sfrom\swithin\n"uplevel\s#0\s{error\sFOO}"}\s-errorline\s1}\n\nThus:\sthe\scompiled\s[catch]\sincludes\sitself\sin\sthe\s-errorinfo,\swhereas\sthe\sinterpreted\sdoes\snot.\sIMHO\sthe\slatter\sis\smore\scorrect.\s(If\sthere\swas\salso\sa\sreliable\sway\sof\sdropping\sthe\s[uplevel]\sI'd\sbe\sall\sears,\sbut\sI\scan\slive\swith\sthat.)\n\nIn\stoday's\s8.6a1+NRE,\sthe\scompiled\sresult\sis\sslightly\sdifferent,\sbut\sthe\sinterpreted\sresult\sstays\sthe\ssame:\n\n%\scompiled\s{uplevel\s#0}\s{error\sFOO}\n1\sFOO\s{-code\s1\s-level\s0\s-errorcode\sNONE\s-errorinfo\s{FOO\n\s\s\s\swhile\sexecuting\n"error\sFOO"\n\s\s\s\s("uplevel"\sbody\sline\s1)\n\s\s\s\sinvoked\sfrom\swithin\n"catch\s[lappend\sprefix\s$script]\sres\sinfo"}\s-errorline\s1}\n\n%\sinterpreted\s{uplevel\s#0}\s{error\sFOO}\n1\sFOO\s{-code\s1\s-level\s0\s-errorcode\sNONE\s-errorinfo\s{FOO\n\s\s\s\swhile\sexecuting\n"error\sFOO"\n\s\s\s\s("uplevel"\sbody\sline\s1)\n\s\s\s\sinvoked\sfrom\swithin\n"uplevel\s#0\s{error\sFOO}"}\s-errorline\s1}\n\nI\sactually\sfind\sthis\scompiled\sbehaviour\sa\schange\sto\sthe\sworse,\sbecause\sit\splaces\sgreater\semphasis\son\sirrelevant\sdetails\s(how\sthe\scommand\sbeing\scaught\sis\sconstructed\sand\scaught)\swhile\shiding\ssome\smore\srelevant\sdetails\s(what\sthe\scommand\sbeing\scaught\sis).
J foundin obsolete:\s8.6a1
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter lars_h
J subsystem 47.\sBytecode\sCompiler
J title Too\smuch\serrorinfo\sat\scatch
J type Bug
K 2038069fffffffffffffffffffffffffffffffff
U lars_h
Z 8dbe5eeb440c62eebfeed7813dbab0a9