summaryrefslogtreecommitdiffstats
path: root/library/dialog.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-08-27 19:48:23 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-08-27 19:48:23 (GMT)
commitc422e69fb20bdd6f7eeaec2f67d5dc35874f6c97 (patch)
treec8cd1c66faa65fac8be9a9a85c0fc3ba7b8a564f /library/dialog.tcl
parentf3c1619ae427be91cfa91ee6bcea3b7445ab72ef (diff)
parentcff7e38ce85264e816b2d388b46b144e84d2bfab (diff)
downloadtk-c422e69fb20bdd6f7eeaec2f67d5dc35874f6c97.zip
tk-c422e69fb20bdd6f7eeaec2f67d5dc35874f6c97.tar.gz
tk-c422e69fb20bdd6f7eeaec2f67d5dc35874f6c97.tar.bz2
Generate -errorcode values to go with errors. Generate messages and postscript
using Tcl_Obj API, not the string result API.
Diffstat (limited to 'library/dialog.tcl')
-rw-r--r--library/dialog.tcl5
1 files changed, 3 insertions, 2 deletions
diff --git a/library/dialog.tcl b/library/dialog.tcl
index adea259..6a9babb 100644
--- a/library/dialog.tcl
+++ b/library/dialog.tcl
@@ -34,8 +34,9 @@ proc ::tk_dialog {w title text bitmap default args} {
# Check that $default was properly given
if {[string is integer -strict $default]} {
if {$default >= [llength $args]} {
- return -code error "default button index greater than number of\
- buttons specified for tk_dialog"
+ return -code error -errorcode {TK DIALOG BAD_DEFAULT} \
+ "default button index greater than number of buttons\
+ specified for tk_dialog"
}
} elseif {"" eq $default} {
set default -1
for_3598300_problems Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/tests/ioCmd.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-10-12 19:45:24 (GMT)
committerhobbs <hobbs>2001-10-12 19:45:24 (GMT)
commit4141ecefa3e830c2f478a6496a4b943057977f23 (patch)
tree43c0a3a14a7a7cdd8a74cf2c0d5301af7957a3b2 /tests/ioCmd.test
parent61f30998eb0fccab4184bdb9b5c1676a0c882da9 (diff)
downloadtcl-4141ecefa3e830c2f478a6496a4b943057977f23.zip
tcl-4141ecefa3e830c2f478a6496a4b943057977f23.tar.gz
tcl-4141ecefa3e830c2f478a6496a4b943057977f23.tar.bz2
* tests/ioCmd.test: added catch around file removal, as Windows
file locking throws errors.