Re: [info stacktrace] → ask for assistance

Liste des GroupesRevenir à cl tcl 
Sujet : Re: [info stacktrace] → ask for assistance
De : aotto1968 (at) *nospam* t-online.de (aotto1968)
Groupes : comp.lang.tcl
Date : 26. Nov 2024, 19:58:58
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vi55pi$3iikp$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 26.11.24 09:09, Harald Oehlmann wrote:
 > Hi,
 > remark that "info errorstack" and the stack trace are different things.
 > In the first, variable names are replaced by values.
 > In the second, there are the variable names "$var".
 >
 > They don't match directly.
 >
 > THanks,
 > Harald
 >
This is funny because "errorInfo" and "errorStack" are written in the same proc "
/*
  *----------------------------------------------------------------------
  *
  * TclLogCommandInfo --
  *
  *  This function is invoked after an error occurs in an interpreter. It
  *  adds information to iPtr->errorInfo/errorStack fields to describe the
  *  command that was being executed when the error occurred. When pc and
  *  tosPtr are non-NULL, conveying a bytecode execution "inner context",
  *  and the offending instruction is suitable, that inner context is
  *  recorded in errorStack.
  *
  * Results:
  *  None.
  *
  * Side effects:
  *  Information about the command is added to errorInfo/errorStack and the
  *  line number stored internally in the interpreter is set.
  *
  *----------------------------------------------------------------------
  */
and the "errorInfo" has a BETTER info than the "errorStack" ?
I use to raise MY error in a my-error-raise-proc and I use [info frame..] to collect all
the required data to build my-errorStack proper.
The problem is the "errorStack" from OTHER software or from TCL self witch do NOT
collect all the available Info.
My question is simple:
why someone program a [info errorstack ...] to provide an API for a missing feature and
do NOT call all the data available from [info frame] ?
TCL could have a wonderful "exception" interface
1. The (Tcl_GetReturnOptions) dict is the "exception-object"
     >   example:
     >   Tcl_GetReturnOptions(interp,TCL_ERROR): -code 1 -level 0 -errorstack {INNER {invokeStk1 ::tcllcconfig::LcSettingC::MK_NULL LookupBool in} CALL {::oo::Obj40::my LcSettingLookupBool}} -errorcode NONE -errorinfo {'LcSettingC' hdl is NULL
     >       while executing
     >   "$setting LookupBool $name"
     >       (class "::LibLcConfigRpcServer" method "LcSettingLookupBool" line 4)
     >       invoked from within
     >   "::oo::Obj40::my LcSettingLookupBool"} -errorline 1
2. The "-errorstack" key has the LIST of [info frame] dicts until catch
-> everyone is happy

Date Sujet#  Auteur
25 Nov 24 * [info stacktrace] → ask for assistance5aotto1968
26 Nov 24 `* Re: [info stacktrace] → ask for assistance4Harald Oehlmann
26 Nov 24  `* Re: [info stacktrace] → ask for assistance3aotto1968
27 Nov 24   `* Re: [info stacktrace] → ask for assistance2Ralf Fassel
27 Nov 24    `- Re: [info stacktrace] → ask for assistance1aotto1968

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal