ptclconnects to the Tcl error reporting mechanism,
pigipops up windows containing error messages, and
interpretersimply prints messages on the standard error stream. All member functions of Error are static. There are four "levels" of messages that may be produced by the error facility:
Error::abortRunis used to report an error and cause execution of the current universe to halt.
Error::errorreports an error.
Error::warnreports a warning, and
Error::messageprints an information message that is not considered an error. Each of these four functions is available with two different signatures. For example:
static void abortRun (const char*, const char* = 0, const char* = 0);The first form produces the error message by simply concatenating its arguments (the second and third arguments may be omitted); no space is added. The second form prepends the full name of the
static void abortRun (const NamedObj& obj, const char*, const char* = 0,
const char* = 0);
objargument, a colon, and a space to the text provided by the remaining arguments. If the implementation provides a marking facility, the object named by
objis marked by the user interface (at present, the interface associated with
pigiwill highlight the object if its icon appears on the screen). The remaining static Error functions
messagehave the same signatures as does
abortRun(there are the same two forms for each function). In addition, the Error class provides access to the marking facility, if it exists:
static int canMark();This function returns TRUE if the interface can mark NamedObj objects (generally true for graphic interfaces), and FALSE if it cannot (generally true for text interfaces).
static void mark (const NamedObj& obj);This function marks the object
obj,if marking is implemented for this interface. It is a no-op if marking is not implemented.