The Autopackage API

Table of Contents / Private library / Debugging framework

Debugging framework

These functions are used internally for debugging.

Functions in this category

trace<MESSAGE>
err<MESSAGE>
warn<MESSAGE>
assertNotReached


Details

trace
Syntax: trace <MESSAGE>
MESSAGE: The debug message you wish to be printed to stderr
trace will print out the line number in the file, the current function and the given message It is part of the debugging framework trace will only give output when DEBUGLEVEL is >= 3


err
Syntax: err <MESSAGE>
message: The debug message you wish to be printed to stderr
err will print out the line number in the file, the current function and the given message in red It is part of the debugging framework err will only give output when DEBUGLEVEL is >= 1


warn
Syntax: warn <MESSAGE>
message: The debug message you wish to be printed to stderr
warn will print out the line number in the file, the current function and the given message It is part of the debugging framework warn will only give output when DEBUGLEVEL is >= 2


assertNotReached
Syntax: assertNotReached
This function prints an error message, and terminates the current shell. It should be used when you know that a section of code should never be reached, and if it is then something went badly wrong.
If the $ASSERTION_TOPLEVEL_SHELL_PID environment variable is defined, it will do a kill on that pid after printing the error. Otherwise, it calls exit 1


Last update: 10/6/2003