Forum OpenACS Q&A: problem with nstcl version 1.0

Request notifications

Collapse
Posted by Dan Wickstrom on
Michael, since you've been hanging out here lately, I'll just post
this here.

While debugging the new version of Openfts, I found a bug in the
db_foreach function of nstcl.  A continue statement in the code block
causes an error to be thrown, when instead it should just continue on
to the next iteration.  Modifying the return code switch statement to
do nothing in the event of a return code (code #4) fixes the problem.

In addition throwing an error  that includes the global errorInfo and
errorCode values can be quite misleading when an error has not
actually occured - as happened with the continue statement.  These
global vars are set even if you catch the error, so the resulting
traceback can be quite confusing if the default statement is reached.
The global error values should only be used if the return code
corresponds to an actual error (code #1).

Collapse
Posted by Michael A. Cleverly on
Thanks for the bug report.  It'll be corrected in nstcl 1.1 which I plan on releasing before leaving this weekend for the Tcl conference in Vancouver.  If you find any other problems, or things you think could be improved, please let me know.
Collapse
Posted by Michael A. Cleverly on
Fixed in CVS (see nstcl.sourceforge.net) & in todays forthcoming nstcl-1.1 release.