[Glass] Debugging exceptions (continuations are mandatory, aren't they?)
Dale Henrichs via Glass
glass at lists.gemtalksystems.com
Tue Mar 1 15:02:10 PST 2016
On 03/01/2016 07:08 AM, Mariano Martinez Peck via Glass wrote:
> Hi guys,
>
> In my application, I have some error handler at some point (#on:do:)
> and I kept the exception instance somewhere. Later, I would like to
> open a Seaside debugger on it using WAGemStoneContinuationDebugger.
>
> I am already currently using WAGemStoneContinuationDebugger but for
> "unhandled errors" that end up in the seaside error handler and hence
> I create a continuation. Therefore, I end up sending
> #initializeWithContinuation: to WAGemStoneContinuationDebugger.
>
> In this case I am talking now, I only have the exception, no
> continuation. So I tried something like this:
>
> | comp |
> comp := WAGemStoneContinuationDebugger new.
> comp initializeWithException: anException.
> html anchor
> callback: [self call: comp];
> with: 'Debug'
>
> The stack is indeed rendered. But the problem is that the "stack" I
> see on it, is the stack associated to the rendering of the link...
> (and everything before that link..that is..the rendering of the app).
> There is nothing on the stack related to the "anException".
>
> To solve this, what I had to do, is to create a continuation in my
> error handler block and store the continuation as well as the original
> exception. And then use #initializeWithContinuation: instead of
> #initializeWithException:.
>
> Is this expected?
Yes ... WAGemStoneContinuationDebugger inherits from WAGemStoneWalkback
and when you use #initializeWtihException: you are triggering the
WAGemStoneWalkback behavior ... presumably there should be a
#shouldNotImplement in
WAGemStoneContinuationDebugger>>initializeWithException: ... bot cases
end up sending #initializeWithContext: where all of the action happens
... with a Exception passed in the context is created from the current
process and with a continuation the context is created from the
continuation ..
Dale
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20160301/baf33b08/attachment.html>
More information about the Glass
mailing list