Belay that. Apologies for the noise. resumeUnchecked: is of course the right solution. e.g.<div><br></div><div><div>Array streamContents:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>[:s|</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>[Cogit chooseCogitClass testPCMappingSelect: [:m| true]]</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>on: AssertionFailure, Error</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>do: [:ex| | ctxt |</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>ctxt := ex signalerContext findContextSuchThat:</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>[:ctx| ctx sender selector = #allSelect:]. "testPCMappingSelect uses allSelect: to enumerate so return to allSelect: to continue"</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>s nextPut: (ctxt tempAt: 1).</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>Transcript ensureCr; cr; print: (ctxt tempAt: 1); cr; flush.</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>ex searchFrom: ctxt.</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>ex resumeUnchecked: false]]</div><br><div class="gmail_quote">
On Sat, Jan 22, 2011 at 1:50 PM, Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi All,<div><br></div><div> an attempt to resume an unresumable signal results in raising IllegalResumeAttempt; quite right:</div><div><br></div><div>Exception>>resume</div><div><span style="white-space:pre-wrap">        </span>"Return from the message that signaled the receiver."</div>
<div><br></div><div><span style="white-space:pre-wrap">        </span>self resume: self defaultResumeValue</div><div><br></div><div><br></div><div>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</div>
<div><br></div><div>IllegalResumeAttempt>>isResumable</div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>^ false</div><div>
<br></div><div><br></div><div>So take e.g.</div><div><br></div><div><div><span style="white-space:pre-wrap">        </span>[Cogit chooseCogitClass testPCMappingSelect: [:m| true]]</div><div><span style="white-space:pre-wrap">                </span>on: AssertionFailure</div>
<div><span style="white-space:pre-wrap">                </span>do: [:ex| | ctxt |</div><div><span style="white-space:pre-wrap">                        </span>ctxt := ex signalerContext findContextSuchThat:</div><div><span style="white-space:pre-wrap">                                                </span>[:ctx| ctx sender selector = #allSelect:].</div>
<div><span style="white-space:pre-wrap">                        </span>Transcript ensureCr; print: (ctxt tempAt: 1); flush.</div><div><span style="white-space:pre-wrap">                        </span>[ex resume]</div><div><span style="white-space:pre-wrap">                                </span>on: IllegalResumeAttempt</div>
<div><span style="white-space:pre-wrap">                                </span>do: [:ex| ex resume]]</div></div><div><br></div><div>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.</div>
<div><br></div><div>I propose that we make IllegalResumeAttempt resumable. Objections? Cautions?</div><div><br></div><div>best</div><div>Eliot</div>
</blockquote></div><br></div>