[Xotcl] error not taken in account in init instproc
Gustaf Neumann
neumann at wu-wien.ac.at
Thu Feb 24 02:20:17 CET 2005
Dear Fabrice,
thanks for noting; the bug is confirmed.
Apply this small patch to fix it. We will change the package require
to return the full verison number as well in the next version.
happy xotickling
-gustaf neumann
--- generic/xotcl.c-orig Thu Feb 24 02:04:31 2005
+++ generic/xotcl.c Thu Feb 24 02:11:32 2005
@@ -6391,7 +6391,9 @@
obj->flags |= XOTCL_INIT_CALLED;
}
- Tcl_SetObjResult(in, savedObjResult);
+ if (result == TCL_OK) {
+ Tcl_SetObjResult(in, savedObjResult);
+ }
DECR_REF_COUNT(savedObjResult);
return result;
Fabrice Pardo schrieb:
>The errors seems not to be taken in account in "init" instproc:
>
>Class create C
>C instproc init {e} {
> if {$e} {error "an error"}
> next
>}
>C create o1 1 ;# ::o1
>set errorInfo ;# an error...while executing...
>C create o1 1 ;# now a blank line !
>C create o2 ;# ::o2
>set errorInfo ;# wrong # args: should be "init e" ...
>
># Program version:
>info patchlevel ;# 8.4.8
>package ifneeded XOTcl 1.3.3 ;# load /.../libxotcl1.3.3.so XOTcl
>
>
>
More information about the Xotcl
mailing list