<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 10.12.2010, at 16:37, Clinton Blackmore wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Greetings.<div><br></div><div>In one area of code, I need to set a break point and do some debugging. &nbsp;This code is called deeply within a block that is wrapped up so that the end user does not see errors that occur.</div>
<div><br></div><div>In very simplified form, it is like this:</div><div><br></div><div><div>[ self error: 'Throwing an error' ] ifError: [:err :rcvr | Transcript show: 'Trapped error']</div></div><div><br>
</div><div>When I 'do it', this example will always trap the error instead of breaking into the debugger (which, quit clearly, it is designed to do.)</div><div><br></div><div>While I shudder to think of how easily it could be abused, there is no way to break into a debugger anyway, is there (without finding and disabling the outer block that is sent ifError)? &nbsp;Perhaps a hypothetical self untrappableError or self bringUpTheDebuggerPlease?</div></blockquote><br></div><div>To set a breakpoint do "self halt":</div><div><br></div><div>[ self halt. self error: 'Throwing an error' ] ifError: [:err :rcvr | Transcript show: 'Trapped error']</div><div><br></div><div>
<div style="font-family: Helvetica; font-size: 12px; "><span class="Apple-style-span" style="font-family: Helvetica; ">- Bert -</span></div><span class="Apple-style-span" style="font-size: 12px; "><br class="Apple-interchange-newline"></span>
</div>
<br></body></html>