[Glass] Understanding GciTsContinueWith

Norm Green norm.green at gemtalksystems.com
Fri Jul 30 07:53:04 PDT 2021

The case of  (continueWithError != NULL)  could be used after the 
execution has
stopped at a breakpoint, and you want to continue from the breakpoint, 
signalling some error
other than the breakpoint.

The case of  (continueWithError==NULL && replaceTopOfStack 
!= OOP_ILLEGAL) could be
used to replace self with some other object that would make sense in the 
context of the
method at the top of the stack.  For example if the top of stack 
signalled an Error, you
could possibly replace  self with an instance of Warning and continue 
execution .

Replacing top of stack is  useful after you have used 
to trim signalling of an Error off of the stack and you want to alter 
self within the method
that is now at top of stack .

On 7/30/2021 6:57 AM, Iwan Vosloo via Glass wrote:
> Hi there,
> I am trying to figure out how to use GciTsContinueWith and I don't 
> quite understand the comments (see below).
> I can make it continue code after an exception (such as signalled from 
> a halt), but only if I pass NULL to continueWithError.
> If I pass in the error (GciErrSType) obtained after, say a perform, I 
> just keep getting the same error upon continuing.
> Perhaps what I don't understand is the idea here - what can I replace 
> the top of stack with?
> I would like to understand enough to eventually be able to debug 
> gemstone code (eg, step) via this interface. Can I do this via 
> GciTsContinueWith?
> Thank you
> Iwan
> /*============================================================================== 
>  *  GciTsContinueWith
>  *
>  *  result is OOP_ILLEGAL if an error was returned in *err .
>  *
>  *  If continueWithError is not NULL, continue execution by signalling 
> this
>  *  error and replaceTopOfStack must be OOP_ILLEGAL . In this case,
>  *  top frame of stack must be AbstractException>>signal
>  *  or   AbstractException >>_signalFromPrimitive .
>  *
>  *  Within *continueWithError, if continueWithError->exceptionObj is 
> not OOP_NIL
>  *  it is used to replace self in the top frame,
>  *  otherwise continueWithError->number is used to construct a kind of
>  *  AbstractException to replace self in the top frame.
>  *  Then execution is restarted at start of top frame's method.
>  *
>  *  replaceTopOfStack == OOP_ILLEGAL means TopOfStack will not be changed
>  */

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/archives/glass/attachments/20210730/4480c0e7/attachment.htm>

More information about the Glass mailing list