2003-02-20 Vince Darley <vincentdarley@sourceforge.net>
- * generic/vfs.c: added new debugging feature
- 'vfs::filesystem internalerror ?script?' which can be used
- to specify a script to evaluate when any tclvfs implementation
- throws an error. Once implementation of all .tcl's is complete,
- they should only return TCL_OK or a posix error code. Any other
- code will signal an error which can be caught using this new
- proc. If the script is not set, the behaviour of this extension
- is unchanged.
+ * generic/vfs.c: added new debugging feature 'vfs::filesystem
+ internalerror ?script?' which can be used to specify a script to
+ evaluate when any tclvfs implementation throws a standard Tcl
+ error. Once implementation of all .tcl's is complete, they
+ should only return TCL_OK or a posix error code (which has a Tcl
+ return value of -1). Any other code will signal an unintended
+ error which can be logged or reported using this new hook. If
+ the script is not set, the behaviour of this extension is
+ unchanged. For example:
+
+ vfs::filesystem internalerror vfsreport
+ proc vfsreport {} {
+ puts "vfs bug found: $::errorInfo"
+ }
Note that this has only been applied to those VFS api's which
are not currently able to pass an error message at the Tcl level.