Hi Jakob,
I changed my code a little bit to open a Debugger. Yet I still
have two issues.
You can load the following and run the tests.
Installer ss project: 'Cryptography'; install: 'PromisesLocal'.
The latest PromisesLocal-rww.2.mcz has the changes. You can load
with the above Installer doIt.
I got a little lost in capturing exceptions, within the Vat's event loop #processSends. I have tickled my implementation a little to try and get the Vat event thread to throw an exception, which presents a Debugger. I have been unable to pop up the Debugger on the error, but the promise does get smashed.
I removed catch-all error handling from the PriorityVat>>#processSends. I then added to the error handling in EventualMessageSend>>#value to open a debugger after smashing the resolver.
value
| value |
[value := receiver
perform: selector
withArguments: (self collectArguments: arguments)
inSuperclass: receiver class.
self resolver notNil
ifTrue: [ self resolver resolve: value ] ]
on: Exception
do: [:ex |
self resolver notNil
ifTrue: [self resolver smash: ex].
Processor activeProcess signalException: ex].
I have a couple of issues with this:
--- The full stack ---
EventualProcess(Process)>>signalException:
[] in EventualMessageSend>>value
FullBlockClosure(BlockClosure)>>cull:
[] in Context>>handleSignal:
FullBlockClosure(BlockClosure)>>ensure:
Context>>handleSignal:
ZeroDivide(Exception)>>signal
SmallInteger>>/
[] in EventualMessageSend>>value
FullBlockClosure(BlockClosure)>>on:do:
EventualMessageSend>>value
PriorityVat>>processSends
[] in EventualProcess>>setupContext