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