summaryrefslogtreecommitdiffstats
path: root/library/parray.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-11-24 18:34:16 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-11-24 18:34:16 (GMT)
commit7f7ce5b4a67db42df570c86bcfbc45c4b9fa6d39 (patch)
tree2364e090ac953b831baf01d34a24575afc620e74 /library/parray.tcl
parentf46d2546ab96bd78b76d02331df74ce035c356d4 (diff)
downloadtcl-7f7ce5b4a67db42df570c86bcfbc45c4b9fa6d39.zip
tcl-7f7ce5b4a67db42df570c86bcfbc45c4b9fa6d39.tar.gz
tcl-7f7ce5b4a67db42df570c86bcfbc45c4b9fa6d39.tar.bz2
[a122627849] Improve stack trace from parray on not-array.
Diffstat (limited to 'library/parray.tcl')
-rw-r--r--library/parray.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/parray.tcl b/library/parray.tcl
index 3ce9817..a9c2cb1 100644
--- a/library/parray.tcl
+++ b/library/parray.tcl
@@ -11,7 +11,7 @@
proc parray {a {pattern *}} {
upvar 1 $a array
if {![array exists array]} {
- error "\"$a\" isn't an array"
+ return -code error "\"$a\" isn't an array"
}
set maxl 0
set names [lsort [array names array $pattern]]