.
D 2016-07-02T18:59:57.796
J assignee ferrieux
J closer nobody
J comment (summary\sof\sprevious\sdiscussions\swith\sJeff,\sMiguel\set\r\nal)\r\n\r\nIdea:\serrorInfo\sgives\sonly\sstatic\ssource-level\sinfo\r\n(line\snumbers\sand\ssource\sexcerpts),\sbut\snot\sthe\sactual\r\narguments\sgotten\sby\sthe\sfunctions\son\sthe\sstack.\r\n\r\n(1)\sThis\sproposal\sis\sabout\screating\sa\ssecond\sglobal\r\nvariable,\s::errorStack,\swhich\swould\sbe\sprimarily\sa\sTcl\r\nlist\s(until\ssomebody\sasks\sfor\sits\sstring\srep\sof\r\ncourse),\sinto\swhich\swe'd\sstick\sall\sthe\sdynamic\sinfo\swe\r\nmiss\sin\serrorInfo.\sThe\sstarting\spoint\sis\sto\sstore\sthere\r\nreferences\sto\sthe\ssubstituted\scommands-and-args\slist\sof\r\nthe\scalling\sstack,\swhich\sare\savailable\seven\sat\sTcl\r\nlevel\sas\s[info\slevel\s$n].\sIt\sis\seasy\sto\sdo\sso\swhile\r\nrespecting\sthe\scurrent\scontrol\sflow\sof\serror\sstack:\sat\r\neach\slevel\swe\sstore\sthe\sinfo\spertaining\sto\sthe\scurrent\r\nlevel,\sthen\swe\spop\sback.\sSo\sthis\samounts\sto\s(in\sTcl\r\npseudocode):\r\n\r\nlappend\s::errorStack\s[info\slevel\s0]\r\n\r\nat\sthe\spoint\swhere\serrorInfo\sis\scurrently\sbeing\sbuilt.\r\n\r\n(2)\sPossible\sextension\sto\sthis\sproposal:\sfaster\r\nreimplementation\sof\serrorInfo,\sleading\sto\sa\smuch\sfaster\r\n[catch]\sin\sthe\snegative\s(error)\scase.\sPrinciple:\r\n\r\n-\sextend\sthe\sabove\smechanism\swith\sfile\sand\sline\s\r\n\s\snumber\sinfo\sfrom\sTIP#86,\sand\sstore\sthem\s\r\n\s\salongside\sthe\s[info\slevel]s\sin\serrorStack.\r\n\r\n-\sremove\sall\scurrent\serrorInfo-construction\s\r\n\s\scode\s(especially\sthe\sline-counting\sloop\s!)\s\r\n\s\sand\sreimplement\serrorInfo\swith\sa\sread\strace,\s\r\n\s\sreproducing\sexactly\stoday's\ssyntax\sbut\sbased\s\r\n\s\son\sthe\sdata\sin\serrorStack,\sand\sonly\sif\s\r\n\s\serrorInfo\sis\sused\s(which\sis\snot\sthe\scase\sof\s\r\n\s\sall\s[catch]es,\shence\sthe\sspeed\sgain\s!).\r\n\r\nI\shave\sposted\sa\sfirst\sstep\stowards\sthis\sin\spure\sTcl\son\r\ncomp.lang.tcl.\sBut\sclearly\sit\ssuffers\sfrom\sall\sthe\r\nlimitations\sof\sthe\scurrent\serrorInfo\sconstruction\r\nmechanism,\swhich\sbadly\sinteracts\swith\sreentrant\s[eval]\r\nof\sthe\sTcl\scode\sin\sany\swrite\strace\son\serrorInfo\s!\r\n\r\nHence\sthis\sproposal\sas\sa\score\spatch,\swhich\swould\sbe\r\nIMHO\smuch\smore\selegant\s(and\ssimple,\sand\sefficient...)\r\nthan\sthis\spure-Tcl\ssimulation
J icomment \r\nDid\sthis\sbecome\sTIP\s348\s?\r\n\r\nCan\sit\snow\sbe\sclosed?
J login dgp
J mimetype text/plain
J severity Minor
K 523900ffffffffffffffffffffffffffffffffff
U dgp
Z 2f9e62083917dc727431d5fc656db660