[Cuis-dev] ProgressInitiationException sendNotificationsTo: will bypass all inner blocks
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Tue Apr 27 08:45:12 PDT 2021
Hi all,
If you execute (ProgressInitiationException testWith), you'll see that
a debugger opens due to ZeroDivide exception at step 5.
If you execute (ProgressInitiationException testWithout), that is
without catching the ProgressInitiationException , you'll see that the
progress continues to step 10, the ZeroDivide exception being caught
by inner on:do: handler.
Though, the purpose is to catch the ProgressInitiationException ,
prevent a progress bar to open, and resume without further interfering
with protected block evaluation (the receiver of outer on:do:).
Progress bar opening apart, the behavior should not be altered with or
without the handler. This is currently broken.
I think that this could be achieved by letting sendNotificationsTo:
use resumeEvaluating:. This will have a side effect that (on:
ProgressInitiationException do:) will be re-entrant and thus catch all
the inner ProgressInitiationException instead of only one. In Squeak,
that can't work, because expectations are more complex, but maybe
that's the desired behavior in Cuis.
More information about the Cuis-dev
mailing list