# bgerror.tcl --
#
# This file contains a default version of the bgerror procedure. It
# posts a dialog box with the error message and gives the user a chance
# to see a more detailed stack trace.
#
# SCCS: @(#) bgerror.tcl 1.9 96/05/02 10:17:11
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# The following declaration servers no purpose other than to generate
# a tclIndex entry for "tkerror". Since tkerror and bgerror are hard-wired
# by the Tcl interpreter to be synonyms, the definition of tkerror is
# immediately overridden when bgerror is defined.
proc tkerror {} {}
# bgerror --
# This is the default version of bgerror. It posts a dialog box containing
# the error message and gives the user a chance to ask to see a stack
# trace.
# Arguments:
# err - The error message.
proc bgerror err {
global errorInfo
set info $errorInfo
set button [tk_dialog .bgerrorDialog "Error in Tcl Script" \
return
return -code break
}
set w .bgerrorTrace
catch {destroy $w}
# Center the window on the screen.
update idletasks
# Be sure to release any grabs that might be present on the
# screen, since they could make it impossible for the user
# to interact with the stack trace.
}
}