Teek API Documentation

Raised on a Tcl error (TCL_ERROR) from #tcl_eval, #tcl_invoke, or anything built on them. message is the same short one-line Tcl result this exception has always carried; #tcl_backtrace and #tcl_error_code additionally expose Tcl’s own errorInfo/errorCode for the failing call - captured immediately after the failing Tcl_Eval/Tcl_EvalObjv via Tcl_GetReturnOptions, before anything else can run and disturb them. Both are nil for the handful of Ruby-level guard errors (e.g. “interpreter has been deleted”) that never actually reached Tcl.

Inherits: RuntimeError

Instance Methods

initialize(message, tcl_backtrace nil, tcl_error_code nil)

Returns TclError — a new instance of TclError

@api private

Attributes

tcl_backtrace [R]

Returns String, nil — Tcl's errorInfo for the failing call - a multi-line trace with a "while executing"/"invoked from within" frame for each level of Tcl proc call the error unwound through

tcl_error_code [R]

Returns String, nil — Tcl's errorCode for the failing call (a Tcl list, typically "NONE" unless the failing command set one explicitly)