On 2012-09-07, at 10:40, Henrik Sperre Johansen <[email protected]>
wrote:
> On 07.09.2012 10:17, Joe Rickerby wrote:
>> Hi all,
>>
>> I'm having a problem trying to build a run loop. If an exception is
>> signalled within one of the run loop tasks, the exception escapes through
>> the loop and terminates the process.
>>
>> I know I can catch the exception, and do something like print the message on
>> the Transcript, but I was hoping to build something that was more helpful in
>> development, allowing me to look through the stack, but if I press 'abandon'
>> on that dialog, the run loop would continue from where I caught the
>> exception.
>>
>>
> Isn't that exactly what happens if you don't handle the error, and use the
> proceed button in (pre and normal) debugger windows?
exactly! If you are using 2.0 you can rely on the #debug message
[ Error signal: 'Boom' ]
on: Error do: [ :error| error debug ].
otherwise simply do
Error signal: 'Boom'
and you'll get the debugger...
If you want to print the stack explicitly try the debugStack:
error signalContext printDebugOn: aStream