|
From: Joe E. <jen...@fl...> - 2008-12-03 19:16:54
|
Donal K. Fellows wrote:
> Andreas Leitgeb wrote:
> > A few minor questions about implementation (I'm just curious):
> > How does the byte-coded "lrange" thing deal with bad lists
> > (i.e. something like "{fsg fds}dsfa {" ) ? The TIP specifies
> > that no errors be thrown for non-list errorCodes or patterns.
>
> Ooops, missed that. I'll change that when I call the vote because it's
> not a good decision. The list interpretation of error codes has been
> assumed for well over a decade, so a non-list error code is an error itself.
The current specification (r1.7, section "Handlers", "Notes & clarifications",
bullet point 5):
| If any errorcode happens to be not a list, a trap handler will be unable
| to process it.
looks right to me.
If you rephrase it, please ensure that the new text
continues to specify that in the following:
proc throw-bad-errorinfo {} {
return -code error -errorinfo "not { a list" "bad"
}
try {
throw-bad-errorinfo
} trap {whatever} {} {
# (1)
} on error {msg opts} {
# (2)
} finally {
# (3)
}
clauses (2) and (3) are executed.
--JE
|