77
77
The B<Tk> module includes a default B<Tk::Error> subroutine
78
78
that simply reports the error on stderr.
80
An alternate definition is provided via :
80
=head1 Tk::ErrorDialog
82
An alternate definition is provided via:
82
84
S< >C<require Tk::ErrorDialog;>
85
87
the user a chance to see a stack trace showing where the
90
This is an OO implementation of the Tcl/Tk command B<bgerror>, with a
91
twist: since there is only one B<ErrorDialog> widget, you aren't required
92
to invoke the constructor to create it; it will be created
93
automatically when the first background error occurs. However, in
94
order to configure the I<-cleanupcode> and I<-appendtraceback>
95
B<ErrorDialog> options you must call the constructor and create it
98
The B<ErrorDialog> object essentially consists of two subwidgets: a
99
B<Dialog> widget to display the background error and a B<Text> widget
100
for the traceback information. If required, you can invoke various
101
widget methods to customize these subwidgets - their advertised names
104
S< >I<$mw>-E<gt>B<ErrorDialog>(-cleanupcode => I<code>, -appendtraceback => I<bool>);
106
$mw is a window reference.
108
I<code> is a CODE reference if special post-background error
109
processing is required (default is undefined). The callback subroutine
110
is called with @_ having the same arguments that B<Tk::Error> was
113
I<bool> is a boolean indicating whether or not to append successive
114
tracebacks (default is 1, do append).
116
=head2 Advertised ErrorDialog widgets
118
I<error_dialog> is the Dialog widget reference.
120
I<text> is the Text widget reference containing the traceback information.
90
124
If B<after> or B<fileevent> are not invoked as methods of a widget