Re: [tclwebtest] Proposed patch to ignore socket errors
Status: Abandoned
Brought to you by:
tils
From: Tilmann S. <ti...@ti...> - 2003-03-05 06:39:39
|
* Grzegorz Adam Hankiewicz <gr...@ef...> [20030303 15:26]: > I think that even though the user can catch any problem in > tclwebtest's code thanks to the exception mechanism, it is less > fearsome for users to recieve a single line human readable error > than a complex stack trace. If one is afraid of seeing stacktraces s/he shouldn't be programming in tcl ;) > Also, you might want to write specific (like null) values into > some of tclwebtest's variables in the failure case so that other > commands don't need to be wrapped inside catch too, or have undefined > consequences: > > catch { do_request something_that_clearly_fails } > log [response text] # <-- will this fail? what should be the output? The behaviour after a socket error is always undefined, wether you set all variables to null or not, that's why I still think it is good to trow a normally uncaught error. I rather thought catch could be used like that in individual tests if necessary: if { ![catch { do_request something_that_clearly_fails }] } { assertion_failed "Unexpectedly we got a reply from something_that_clearly_fails." } til -- http://tsinger.com |