Next Prev Up

Error Handling

The functions supplied by the error module can be divided into error handling functions and error evaluation functions.

All error handling functions concatenates the given arguments together with the : separator string between them.

juf_err_fat [ARGS...]
Prints an error message on stderr and exits the current process.
juf_err_err [ARGS...]
Print an error message on stderr.
juf_err_warn [ARGS...]
Print an error message on stderr with the text "warning" preprended.

Only one error evaluation function exists by now:

juf_err_tclmsg
Evaluates the Tcl variable and generates an appropriate error message.
This is useful for reporting errors on file operations:
if {[catch "open [lindex $argv 0]" fileid] != 0} {
	juf_err_fat [lindex $argv 0] [juf_err_tclmsg]
}

Written by Stefan Hornburg <racke@gundel.han.de>
Last modified 10 April 1997