[squeak-dev] IMO IllegalResumeAttempt should be resumable

Eliot Miranda eliot.miranda at gmail.com
Sat Jan 22 21:50:03 UTC 2011


Hi All,

    an attempt to resume an unresumable signal results in
raising IllegalResumeAttempt; quite right:

Exception>>resume
"Return from the message that signaled the receiver."

self resume: self defaultResumeValue


However, IllegalResumeAttempt is not itself resumable.  So in those rare
cases (e.g. test coverage) where a knowledgeable client wants to force
resumption of a non-resumable signal by catching and resuming
IllegalResumeAttempt, they can't because

IllegalResumeAttempt>>isResumable
 ^ false


So take e.g.

[Cogit chooseCogitClass testPCMappingSelect: [:m| true]]
on: AssertionFailure
do: [:ex| | ctxt |
ctxt := ex signalerContext findContextSuchThat:
[:ctx| ctx sender selector = #allSelect:].
Transcript ensureCr; print: (ctxt tempAt: 1); flush.
[ex resume]
on: IllegalResumeAttempt
do: [:ex| ex resume]]

where I'm trying to JIT every method in my image and catalogue those that
assert-fail, proceeding through the assert failure (and AssertionFailure
isn't resumable).  I happen to know that proceeding from the assert-fails is
safe.  But I can't force resumption because IllegalResumeAttempt is itself
not resumable.

I propose that we make IllegalResumeAttempt resumable.  Objections?
 Cautions?

best
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20110122/74b6a6e4/attachment.htm


More information about the Squeak-dev mailing list