Skip to content
Tcl Source Code Artifact [4f7fa77a07]
Login

Artifact [4f7fa77a07]

Artifact 4f7fa77a07f4983c6cd9eb24e9ecb1294c963e17:

Ticket change [4f7fa77a07] - New ticket [523900ffffffffff|523900ffff] <i>Substituted error stacks</i>. by nobody on 2002-02-28 16:16:13.
D 2002-02-28T16:16:13
J assignee msofer
J cmimetype text/plain
J comment (summary\sof\sprevious\sdiscussions\swith\sJeff,\sMiguel\set\nal)\n\nIdea:\serrorInfo\sgives\sonly\sstatic\ssource-level\sinfo\n(line\snumbers\sand\ssource\sexcerpts),\sbut\snot\sthe\sactual\narguments\sgotten\sby\sthe\sfunctions\son\sthe\sstack.\n\n(1)\sThis\sproposal\sis\sabout\screating\sa\ssecond\sglobal\nvariable,\s::errorStack,\swhich\swould\sbe\sprimarily\sa\sTcl\nlist\s(until\ssomebody\sasks\sfor\sits\sstring\srep\sof\ncourse),\sinto\swhich\swe'd\sstick\sall\sthe\sdynamic\sinfo\swe\nmiss\sin\serrorInfo.\sThe\sstarting\spoint\sis\sto\sstore\sthere\nreferences\sto\sthe\ssubstituted\scommands-and-args\slist\sof\nthe\scalling\sstack,\swhich\sare\savailable\seven\sat\sTcl\nlevel\sas\s[info\slevel\s$n].\sIt\sis\seasy\sto\sdo\sso\swhile\nrespecting\sthe\scurrent\scontrol\sflow\sof\serror\sstack:\sat\neach\slevel\swe\sstore\sthe\sinfo\spertaining\sto\sthe\scurrent\nlevel,\sthen\swe\spop\sback.\sSo\sthis\samounts\sto\s(in\sTcl\npseudocode):\n\nlappend\s::errorStack\s[info\slevel\s0]\n\nat\sthe\spoint\swhere\serrorInfo\sis\scurrently\sbeing\sbuilt.\n\n(2)\sPossible\sextension\sto\sthis\sproposal:\sfaster\nreimplementation\sof\serrorInfo,\sleading\sto\sa\smuch\sfaster\n[catch]\sin\sthe\snegative\s(error)\scase.\sPrinciple:\n\n-\sextend\sthe\sabove\smechanism\swith\sfile\sand\sline\s\n\s\snumber\sinfo\sfrom\sTIP#86,\sand\sstore\sthem\s\n\s\salongside\sthe\s[info\slevel]s\sin\serrorStack.\n\n-\sremove\sall\scurrent\serrorInfo-construction\s\n\s\scode\s(especially\sthe\sline-counting\sloop\s!)\s\n\s\sand\sreimplement\serrorInfo\swith\sa\sread\strace,\s\n\s\sreproducing\sexactly\stoday's\ssyntax\sbut\sbased\s\n\s\son\sthe\sdata\sin\serrorStack,\sand\sonly\sif\s\n\s\serrorInfo\sis\sused\s(which\sis\snot\sthe\scase\sof\s\n\s\sall\s[catch]es,\shence\sthe\sspeed\sgain\s!).\n\nI\shave\sposted\sa\sfirst\sstep\stowards\sthis\sin\spure\sTcl\son\ncomp.lang.tcl.\sBut\sclearly\sit\ssuffers\sfrom\sall\sthe\nlimitations\sof\sthe\scurrent\serrorInfo\sconstruction\nmechanism,\swhich\sbadly\sinteracts\swith\sreentrant\s[eval]\nof\sthe\sTcl\scode\sin\sany\swrite\strace\son\serrorInfo\s!\n\nHence\sthis\sproposal\sas\sa\score\spatch,\swhich\swould\sbe\nIMHO\smuch\smore\selegant\s(and\ssimple,\sand\sefficient...)\nthan\sthis\spure-Tcl\ssimulation\n
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 07.\sVariables
J title Substituted\serror\sstacks
J type RFE
K 523900ffffffffffffffffffffffffffffffffff
U nobody
Z 0d0f596a9a2a7348005e226082c27629