stdlib: errorInfo includes the live stacktrace
commitafe074ccf68410addadb5e30d928b05fc02fdff6
authorSteve Bennett <steveb@workware.net.au>
Sat, 4 Jan 2014 22:42:21 +0000 (5 08:42 +1000)
committerSteve Bennett <steveb@workware.net.au>
Tue, 14 Jan 2014 21:46:32 +0000 (15 07:46 +1000)
treedb6b2853cf252b6f0ae73470cc6d7023f97f97e0
parent4454f2a3aaa7ee629b70274687d3cb4dbf1107dd
stdlib: errorInfo includes the live stacktrace

Rather than just the error backtrace ([info stacktrace]),
include the live stacktrace. This means it is possible to do:

  if {[catch $script msg]}
    puts [errorInfo $msg]
  }

to output the stack trace from the top level, not just from the point of capture.

It is still possible to pass a stacktrace to errorInfo to override this behaviour.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
stdlib.tcl