summaryrefslogtreecommitdiffstats
path: root/tests/error.test
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2006-01-11 17:34:53 (GMT)
committerdgp <dgp@noemail.net>2006-01-11 17:34:53 (GMT)
commitae2591739deb9a69b212e335a2fe390c5f7d709e (patch)
treea35f7dcda6d1cd258e9898b035bcffedb47c925e /tests/error.test
parentd08c1db5551f0bd040894f5a53225e41c0ef4536 (diff)
downloadtcl-ae2591739deb9a69b212e335a2fe390c5f7d709e.zip
tcl-ae2591739deb9a69b212e335a2fe390c5f7d709e.tar.gz
tcl-ae2591739deb9a69b212e335a2fe390c5f7d709e.tar.bz2
* generic/tclBasic.c: Moved Tcl_LogCommandInfo from tclBasic.c to
* generic/tclNamesp.c: tclNamesp.c to get access to identifier with * tests/error.test (error-7.0): file scope. Added check for traces on ::errorInfo, and when present fall back to contruction of the stack trace in the variable so that write trace notification timings are compatible with earlier Tcl releases. This reduces, but does not completely eliminate the ***POTENTIAL INCOMPATIBILITY*** created by the 2004-10-15 commit. [Bug 1397843]. FossilOrigin-Name: 4436b38816dbf1fbb867093732b5457682a243cc
Diffstat (limited to 'tests/error.test')
-rw-r--r--tests/error.test23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/error.test b/tests/error.test
index ab35c5d..d8bfaba 100644
--- a/tests/error.test
+++ b/tests/error.test
@@ -11,10 +11,10 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: error.test,v 1.13 2005/07/28 18:42:28 dgp Exp $
+# RCS: @(#) $Id: error.test,v 1.14 2006/01/11 17:34:54 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
- package require tcltest
+ package require tcltest 2
namespace import -force ::tcltest::*
}
@@ -220,6 +220,25 @@ test error-6.9 {catch must reset error state} {
list $errorCode
} {NONE}
+namespace eval ::tcl::test::error {
+ test error-7.0 {Bug 1397843} -body {
+ variable cmds
+ proc EIWrite args {
+ variable cmds
+ lappend cmds [lindex [info level -2] 0]
+ }
+ proc BadProc {} {
+ set i a
+ incr i
+ }
+ trace add variable ::errorInfo write [namespace code EIWrite]
+ catch BadProc
+ trace remove variable ::errorInfo write [namespace code EIWrite]
+ set cmds
+ } -match glob -result {*BadProc*}
+}
+namespace delete ::tcl::test::error
+
# cleanup
catch {rename p ""}
::tcltest::cleanupTests