Index: openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl,v diff -u -r1.42.2.5 -r1.42.2.6 --- openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 25 Mar 2016 10:01:26 -0000 1.42.2.5 +++ openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 3 Oct 2016 20:40:03 -0000 1.42.2.6 @@ -49,19 +49,41 @@ proc ad_get_tcl_call_stack { { level -2 }} { set stack "" + # + # keep the previous state of ::errorInfo + # + set errorInfo $::errorInfo + for { set x [expr {[info level] + $level}] } { $x > 0 } { incr x -1 } { set info [info level $x] regsub -all \n $info {\\n} info + # + # In case, we have an nsf frame, add information about the + # current object and the current class to the debug output. + # + if {![catch {uplevel #$x ::nsf::current} obj] + && ![catch {uplevel #$x [list ::nsf::current class]} class] + } { + set objInfo [list $obj $class] + set info "{$objInfo} $info" + } + # + # Don't produce too long lines + # if {[string length $info]>200} { set arglist "" foreach arg $info { if {[string length $arg]>40} {set arg [string range $arg 0 40]...} lappend arglist $arg } set info $arglist - } + } append stack " called from $info\n" } + # + # restore previous state of ::errorInfo + # + set ::errorInfo $errorInfo return $stack }