~ubuntu-branches/ubuntu/vivid/gcl/vivid

« back to all changes in this revision

Viewing changes to info/gcl-tk/tkerror.html

  • Committer: Package Import Robot
  • Author(s): Camm Maguire
  • Date: 2014-05-16 17:41:33 UTC
  • mto: This revision was merged to the branch mainline in revision 62.
  • Revision ID: package-import@ubuntu.com-20140516174133-czs0uktsjj2vkhxk
2.6.11preĀ testĀ 11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
2
<html>
 
3
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
 
4
<head>
 
5
<title>GCL TK Manual: tkerror</title>
 
6
 
 
7
<meta name="description" content="GCL TK Manual: tkerror">
 
8
<meta name="keywords" content="GCL TK Manual: tkerror">
 
9
<meta name="resource-type" content="document">
 
10
<meta name="distribution" content="global">
 
11
<meta name="Generator" content="makeinfo">
 
12
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
13
<link href="index.html#Top" rel="start" title="Top">
 
14
<link href="wm.html#SEC_Contents" rel="contents" title="Table of Contents">
 
15
<link href="Control.html#Control" rel="up" title="Control">
 
16
<link href="tkvars.html#tkvars" rel="next" title="tkvars">
 
17
<link href="tk.html#tk" rel="prev" title="tk">
 
18
<style type="text/css">
 
19
<!--
 
20
a.summary-letter {text-decoration: none}
 
21
blockquote.smallquotation {font-size: smaller}
 
22
div.display {margin-left: 3.2em}
 
23
div.example {margin-left: 3.2em}
 
24
div.indentedblock {margin-left: 3.2em}
 
25
div.lisp {margin-left: 3.2em}
 
26
div.smalldisplay {margin-left: 3.2em}
 
27
div.smallexample {margin-left: 3.2em}
 
28
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
 
29
div.smalllisp {margin-left: 3.2em}
 
30
kbd {font-style:oblique}
 
31
pre.display {font-family: inherit}
 
32
pre.format {font-family: inherit}
 
33
pre.menu-comment {font-family: serif}
 
34
pre.menu-preformatted {font-family: serif}
 
35
pre.smalldisplay {font-family: inherit; font-size: smaller}
 
36
pre.smallexample {font-size: smaller}
 
37
pre.smallformat {font-family: inherit; font-size: smaller}
 
38
pre.smalllisp {font-size: smaller}
 
39
span.nocodebreak {white-space:nowrap}
 
40
span.nolinebreak {white-space:nowrap}
 
41
span.roman {font-family:serif; font-weight:normal}
 
42
span.sansserif {font-family:sans-serif; font-weight:normal}
 
43
ul.no-bullet {list-style: none}
 
44
-->
 
45
</style>
 
46
 
 
47
 
 
48
</head>
 
49
 
 
50
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
 
51
<a name="tkerror"></a>
 
52
<div class="header">
 
53
<p>
 
54
Next: <a href="tkvars.html#tkvars" accesskey="n" rel="next">tkvars</a>, Previous: <a href="tk.html#tk" accesskey="p" rel="prev">tk</a>, Up: <a href="Control.html#Control" accesskey="u" rel="up">Control</a> &nbsp; [<a href="wm.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
 
55
</div>
 
56
<hr>
 
57
<a name="tkerror-1"></a>
 
58
<h3 class="section">3.20 tkerror</h3>
 
59
 
 
60
<p>tkerror \- Command invoked to process background errors
 
61
</p><a name="Synopsis-33"></a>
 
62
<h4 class="unnumberedsubsec">Synopsis</h4>
 
63
<p><b>tkerror </b><i>message</i>
 
64
</p>
 
65
<a name="Description-31"></a>
 
66
<h4 class="unnumberedsubsec">Description</h4>
 
67
 
 
68
<p>The <b>tkerror</b> command doesn&rsquo;t exist as built-in part of Tk.  Instead,
 
69
individual applications or users can define a <b>tkerror</b>
 
70
command (e.g. as a Tcl procedure) if they wish to handle background
 
71
errors.
 
72
</p>
 
73
<p>A background error is one that occurs in a command that didn&rsquo;t
 
74
originate with the application.  For example, if an error occurs
 
75
while executing a command specified with a <b>bind</b><span class="roman"> of </span><b>after</b>
 
76
command, then it is a background error.  For a non-background error,
 
77
the error can simply be returned up through nested Tcl command
 
78
evaluations until it reaches the top-level code in the application;
 
79
then the application can report the error in whatever way it
 
80
wishes.  When a background error occurs, the unwinding ends in
 
81
the Tk library and there is no obvious way for Tk to report
 
82
the error.
 
83
</p>
 
84
<p>When Tk detects a background error, it invokes the <b>tkerror</b>
 
85
command, passing it the error message as its only argument.
 
86
Tk assumes that the application has implemented the <b>tkerror</b>
 
87
command, and that the command will report the error in a way that
 
88
makes sense for the application.  Tk will ignore any result returned
 
89
by the <b>tkerror</b> command.
 
90
</p>
 
91
<p>If another Tcl error occurs within the <b>tkerror</b> command
 
92
then Tk reports the error itself by writing a message
 
93
to stderr.
 
94
</p>
 
95
<p>The Tk script library includes a default <b>tkerror</b> procedure
 
96
that posts a dialog box containing the error message and offers
 
97
the user a chance to see a stack trace that shows where the
 
98
error occurred.
 
99
</p>
 
100
<a name="Keywords-34"></a>
 
101
<h4 class="unnumberedsubsec">Keywords</h4>
 
102
<p>background error, reporting
 
103
</p><hr>
 
104
<div class="header">
 
105
<p>
 
106
Next: <a href="tkvars.html#tkvars" accesskey="n" rel="next">tkvars</a>, Previous: <a href="tk.html#tk" accesskey="p" rel="prev">tk</a>, Up: <a href="Control.html#Control" accesskey="u" rel="up">Control</a> &nbsp; [<a href="wm.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
 
107
</div>
 
108
 
 
109
 
 
110
 
 
111
</body>
 
112
</html>