Skip to content
Tcl Source Code Artifact [71e12be4f6]
Login

Artifact [71e12be4f6]

Artifact 71e12be4f60949219ce6b4545810475dc928b7af:

Ticket change [71e12be4f6] - New ticket [1428575fffffffff|1428575fff] <i>Revise Tcl_(Set|Get)ChannelError(Interp) interface</i>. by dgp on 2006-02-09 19:39:30.
D 2006-02-09T19:39:30
J assignee andreas_kupries
J cmimetype text/plain
J comment \nTIP\s219\sconfronted\sthe\sdifficult\nproblem\sthat\sthe\sTcl_Channel\sextension\ninterface\sdoesn't\spermit\seasy\sreporting\nof\serror\sinformation\sin\sthe\susual\sTcl\nmanner\s(code\s+\smsg\s+\sreturn\soptions\sdictionary),\nbut\shas\sa\shistory\sof\sreturning\sonly\na\sPOSIX-style\serror\scode,\sa\schoice\slaid\ndown\slong\sago,\sapparently\sinspired\sby\nunix\sexamples.\n\nThe\sTIP\s219\ssolution\swas\sto\sprovide\na\spair\sof\s"bypass"\sareas\swhere\serror\ninformation\scould\sbe\sstored\sand\sretrieved.\nOne\sarea\sis\sattached\sto\sthe\sTcl_Interp;\nthe\sother\swithin\sthe\sChannelState\sstruct.\nEach\sarea\shas\sGet\sand\sSet\saccessors\sdefined.\n\nIn\seither\scase,\sthe\s"error\sinformation"\nis\spassed\sinto\sthe\s"Set"\saccessor\sis\na\ssingle\sTcl_Obj\svalue.\s\sThe\svalue\sis\ndocumented\sto\sbe\sa\slist\smade\sup\sof\soption\nvalue\spairs\sfollowed\sby\sa\sstring\smessage.\nThis\sformat\scan\sbe\srecognized\sas\sthe\nreturn\soptions\sdictionary\sconverted\sto\sa\slist\nwith\sthe\sinterp\sresult\slappended.\n\nNo\spublic\sTcl\sroutine\sreturns\serror\sinformation\nin\sthis\sformat.\s\sThis\sforces\sthe\scaller\nof\sTcl_SetChannelError(Interp)\sto\sdo\sthis\nmarshalling\sfor\sthemselves.\s\sThe\sone\sknown\ncaller\sof\sthese\sroutines,\sTcl's\sown\nreflected\schannel\ssupport,\sindeed\sis\sforced\nto\sdefine\stwo\sroutines\sMarshallError()\sand\nUnmarshallError()\sto\stend\sto\sthis\sdata\sformatting\ntask.\n\nSeems\sto\sme\sall\sthis\scomplexity\scan\sbe\savoided\nby\sjust\shaving\sthe\sSet/Get\saccessors\saccept\ntwo\sarguments,\sone\sfor\sthe\sinterp\sresult,\nand\sone\sfor\sthe\sreturn\soptions\sdictionary.\n\n(I'm\sassuming\sthe\sresult\scode\sis\snot\srequired,\nsince\sthese\sinterfaces\sare\sintended\sonly\sfor\nthe\ssituation\swhen\sthe\scode\sis\sTCL_ERROR)\n\nSo\sthe\srequest\sis\sto\srevise\sthese\sinterfaces\nto\stake\stwo\sTcl_Obj\sarguments\sinstead\sof\sone.\n\nIn\saddition,\sthe\s"safety\sprecaution"\sdescribed\nin\sTIP\s219,\sand\simplemented\sas\sFixLevelCode()\nis,\sI\sbelieve,\scompletely\sunnecessary.\s\sThe\n-level\sand\s-code\sentries\sof\sthe\sreturn\soptions\ndictionary\sonly\shave\seffect\sfor\sa\sresult\scode\nof\sTCL_RETURN.\s\sSince\sthese\sinterfaces\sare\s\nintended\sonly\sfor\sresult\scodes\sof\sTCL_ERROR,\nthere's\sno\sneed\sto\sworry\sabout\sthem,\sassuming\nboth\ssides\sof\shandling\sthe\sbypass\sareas\senforce\nthe\sTCL_ERROR-only\sinterpretation.
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter dgp
J subsystem 25.\sChannel\sSystem
J title Revise\sTcl_(Set|Get)ChannelError(Interp)\sinterface
J type RFE
K 1428575fffffffffffffffffffffffffffffffff
U dgp
Z 80ea0046bf514bbc82f6ce4a8fd198a8