Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tkerror(1) — Sprite KS.390

Media Vault

Software Library

Restoration Projects

Artifacts Sought

tkerror  —  User Commands

NAME

tkerror − Command invoked to process background errors

SYNOPSIS

tkerror message


 

DESCRIPTION

The tkerror command doesn’t exist as part of Tk.  Instead, individual applications or users can define a tkerror command (e.g. as a Tcl procedure) if they wish to handle background errors. 

A background error is one that occurs in a command that didn’t originate with the application.  For example, if an error occurs while executing a command specified with a bind of after command, then it is a background error.  For a non-background error, the error can simply be returned up through nested Tcl command evaluations until it reaches the top-level code in the application; then the application can report the error in whatever way it wishes.  When a background error occurs, the unwinding ends in the Tk library and there is no obvious way for Tk to report the error. 

When Tk detects a background error, it invokes the tkerror command, passing it the error message as its only argument.  Tk assumes that the application has implemented the tkerror command, and that the command will report the error in a way that makes sense for the application.  Tk will ignore any result returned by the tkerror command. 

If another Tcl error occurs within the tkerror command (e.g. because the application hasn’t defined a tkerror command), then Tk reports the error itself by writing a message to stderr. 
 

KEYWORDS

background error, reporting

Sprite version 1.0  —  

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026