slang-users mailing list

[2021 Date Index] [2021 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] Getting the complete, full error error message


Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
> on jed mailing list I have been directed to use SLang_Dump_Routine to get
> the complete error message (also after doing SLang_Traceback = SL_TB_FULL).
> It works nice, however there's one problem – the apparent inability (?) to
> know when the traceback is over.
>
> In other words, the routine is feed with the traceback line by line (or
> even more often), and there seems to be no trailing NULL message. In which
> way should one decide that he received the complete message ready to
> display?

The traceback message queue get printed only when an uncaught
exception occurs.  If an exception is caught, the traceback messages
will get deleted from the queue, unless the exception handler rethrows
the error.  Only when the the stack has unwound to the top-level can
the interpreter know if there are uncaught exceptions. If the
exception is still active, the queue will get printed and your
SLang_Dump_Routine hook invoked.  At that point, control will pass
back to the calling function that invoked the interpreter.  Only then
can you be sure that the queue has been printed.

Finally, jed also makes use of the SLang_User_Clear_Error hook, which
gets called when an error gets cleared.  This could also be used as an
indication that the traceback queue has been processed.

Does this help?
Thanks,
--John
_______________________________________________
For list information, visit <http://jedsoft.org/slang/mailinglists.html>.


[2021 date index] [2021 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]