[squeak-dev] How to view an old Error in the debugger?

Chris Muller asqueaker at gmail.com
Wed Mar 4 02:59:31 UTC 2015


On Tue, Mar 3, 2015 at 5:59 PM, Bert Freudenberg <bert at freudenbergs.de> wrote:
> On 02.03.2015, at 16:11, Chris Muller <ma.chris.m at gmail.com> wrote:
>>
>> My app signaled an Error, which was handled at a higher level to
>> present a nice message to the user.
>>
>> However, I want to see the stack that led to it.  I have the Error
>> instance that was signaled and I see I have ToolSet class>>#debug:, et
>> al.
>>
>> But by the time it unwinds and I get hold of Error, its
>> signalerContext is gone, so I can't get anything useful from the
>> debugger.
>>
>> As this script shows, in the handler I still have access to the
>> signalerContext, but once I unwind back out, its gone.
>>
>> So is there a way to debug an old error?
>
> You have to suspend the process with the error, and do the error handling in another process. That way you can deal with the error before it is unwound, you can resume etc.

That makes sense but I still want my app to handle the error the way
it does presenting the messageText, but I want to add a button,
"Debug" which will open up what happened in the debugger.  The process
which the error occurs in is the UI process so I can't suspending it.
It seems like I want to somehow clone it.  Wait..  A Continuation!?
Is that what I need?


More information about the Squeak-dev mailing list