[squeak-dev] How to view an old Error in the debugger?
Chris Muller
ma.chris.m at gmail.com
Tue Mar 3 00:11:59 UTC 2015
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?
| errorToDebug |
errorToDebug := [Error signal]
on: Error
do:
[ : err | errorToDebug := err.
self assert: err signalerContext sender notNil.
err ].
self assert: errorToDebug signalerContext sender notNil
Thanks.
More information about the Squeak-dev
mailing list
|