summaryrefslogtreecommitdiffstats
path: root/library/safetk.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)
commit55ad282f48e04748a7cf3d375ad3fc2abb47c0a1 (patch)
treec8cd1c66faa65fac8be9a9a85c0fc3ba7b8a564f /library/safetk.tcl
parentbd27ced6025b5ce285080806ecd44c8b9bc1786a (diff)
parentef65c6ff80f269b8e94aa1ff98e76831b93c4550 (diff)
downloadtk-55ad282f48e04748a7cf3d375ad3fc2abb47c0a1.zip
tk-55ad282f48e04748a7cf3d375ad3fc2abb47c0a1.tar.gz
tk-55ad282f48e04748a7cf3d375ad3fc2abb47c0a1.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/safetk.tcl')
-rw-r--r--library/safetk.tcl10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/safetk.tcl b/library/safetk.tcl
index e664ace..9f8e25d 100644
--- a/library/safetk.tcl
+++ b/library/safetk.tcl
@@ -114,8 +114,8 @@ proc ::safe::loadTk {} {}
}
if {$nDisplay ne $display} {
if {$displayGiven} {
- error "conflicting -display $display and -use\
- $use -> $nDisplay"
+ return -code error -errorcode {TK DISPLAY SAFE} \
+ "conflicting -display $display and -use $use -> $nDisplay"
} else {
set display $nDisplay
}
@@ -139,7 +139,7 @@ proc ::safe::TkInit {interpPath} {
} else {
Log $interpPath "TkInit called for interp with clearance:\
preventing Tk init" ERROR
- error "not allowed"
+ return -code error -errorcode {TK SAFE PERMISSION} "not allowed"
}
}
@@ -219,8 +219,8 @@ proc ::safe::tkTopLevel {slave display} {
incr tkSafeId
set w ".safe$tkSafeId"
if {[catch {toplevel $w -screen $display -class SafeTk} msg]} {
- return -code error "Unable to create toplevel for\
- safe slave \"$slave\" ($msg)"
+ return -code error -errorcode {TK TOPLEVEL SAFE} \
+ "Unable to create toplevel for safe slave \"$slave\" ($msg)"
}
Log $slave "New toplevel $w" NOTICE