[squeak-dev] Short Stack exception presentation (was Re: Dual screen?)

Robert Withers robert.withers at pm.me
Sat Jul 18 11:50:59 UTC 2020


Hi everyone,

Thanks to a response on the Squeak Slack channel, I was able to get most of this done by calling a pre-existing method. Please run:

> Installer ss project: 'Cryptography'; install: 'PromisesLocal'.

Oh! Marcel, this is precisely what I needed, it is already done! I changed the EventualMessageSend>>#value to call this code you shared. StandardToolSet debugException: ex.I run this script to test:(1 eventual / 0) explore.
1 eventual explore.The first line results in an exception and we get a exception notifier and also an explorer on the PromisERef. The promise is resolved to an exception and it #becomes a BrokenERef.

In looking into the exception notifier and the exception browser is that the top frame is the signaler context. Perfect.

The second line validates that the event loop is unblocked. This results in a second inspector on a near value of 1.

The only remaining work is that when proceeded, the exception will reschedule the stack into the vat's queue.

Kindly,
rabbit

On 7/12/20 1:38 PM, Robert Withers wrote:

> On 6/26/20 2:37 PM, Robert Withers wrote:
>
>> On 6/26/20 1:55 PM, Robert Withers wrote:
>>
>>> Closer to my heart, at this point are my questions and request for help
>>> in splitting off a pruned stack for an exception, to unblock the event
>>> loop yet still allow introspection of an error, or a halt. Here is what
>>> I wrote. Tim, might you be able to advise me here?
>>>
>>> *
>>>
>>> lost
>>>
>>> *
>>>
>>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2020-June/210452.html
>
> The requirements for exceptions within an event loop are:
>
> - Copy stack
> - Restart eventLoop
> - Prune stack/Create Continuation
> - Open Debugger
> - When Proceeded, reschedule EventualMessageSend, on the Continuation, in the vat queue.
>
> Would someone please help me here? I am a little lost. I appreciate you!
>
> Kindly,
> rabbit
>
>> Not only do I want this, but the short stack, when Proceeded, should reschedule an eventual message on the event loop to reintroduce this short stack back into event loop land. As such, i was thinking perhaps a continuation could enable this. Liekwise, when a exception is thrown, do these steps:
>>
>>> - Modify the Vat to have a an active stack, a priority queue and a vat-aware continuation pool.
>>> - Copy the stack. Does this mean create a special continuation, that is event loop aware?
>>> - Resume the event loop by discarding the previous event handling exception.
>>> - Prune the stack (of the continuation). above and below. Site of signaled exception.
>>> - Open a Debugger
>>> - On Proceed, reschedule the eventual message in the Vat's queue.
>>
>> I have no idea what B looks like. Outside of my experience doing continuations and stack manipulation and pool scheduling. I need a VatSemaphore (please peruse the ResultSemaphore in PromisesRemote). I pray someone may swoop in with solutions!
>>
>> Kindly,
>> rabbit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200718/4253843d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NearERef-1.jpg
Type: image/jpeg
Size: 12143 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200718/4253843d/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Exception-browser-ZeroDivide.jpg
Type: image/jpeg
Size: 75886 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200718/4253843d/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Exception-notifier-ZeroDivide.jpg
Type: image/jpeg
Size: 21199 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200718/4253843d/attachment-0007.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BrokenERef.jpg
Type: image/jpeg
Size: 13680 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200718/4253843d/attachment-0008.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PromiseERef.jpg
Type: image/jpeg
Size: 13328 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200718/4253843d/attachment-0009.jpg>


More information about the Squeak-dev mailing list