[Glass] How to print an exception stack on a stream?

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Thu Mar 5 15:04:59 PST 2015


Mariano,

I'm assuming that you are trying to do this outside of the normal 
Seaside error handling? For forked gems, 
WAGemStoneProductionErrorHandler is a good option, since it will snap 
off a continuation and then put up an error notification of some kind 
... You could even implement #handleHalt: in 
WAGemStoneProductionErrorHandler to save the continuation and resume for 
seamlessly handling #halts in your code, without interrupting the user.

If you want to snap off custom continuations without errors then take a 
look at DebuggerLogEntry class>>createContinuationLabeled: ... You need 
to arrange to do a commit after you've run that method, but other than 
that this should do the job ... You want to be careful about where you 
do commits when you are processing Seaside requests or at least aware 
that some session state can leak out before request processing is 
complete ...

Dale



On 03/05/2015 02:35 PM, Mariano Martinez Peck wrote:
> And now I was wondering.... how can I write the stack (real objects, 
> not string) into the object log so that I can then click on Debug from 
> GemTools or tODE and get the stack?  I tried to search it 
> around WARemoteDebuggingWalkbackErrorHandler and friends but it looked 
> too seaside-related. For the case I am interested in, the code is 
> being executed in a forked gem that has no Seaside context at all...
>
> Thoughts?
>
> Thanks in advance,
>
>
> On Tue, Mar 3, 2015 at 9:14 PM, Mariano Martinez Peck 
> <marianopeck at gmail.com <mailto:marianopeck at gmail.com>> wrote:
>
>     Thanks Dale, that was exactly what I was looking for.
>
>     Best,
>
>     On Tue, Mar 3, 2015 at 6:34 PM, Dale Henrichs via Glass
>     <glass at lists.gemtalksystems.com
>     <mailto:glass at lists.gemtalksystems.com>> wrote:
>
>         I think you're probably looking for GsProcess
>         class>>stackReportToLevel:.
>
>         Dale
>
>
>         On 03/03/2015 12:51 PM, Mariano Martinez Peck via Glass wrote:
>>         I am checking all Exception hierarchy but I found nothing. In
>>         some code Otto shared with me I see a sender of
>>         #printStackOn:upTo:  but I don't have it.
>>
>>         Any one?
>>
>>         Thanks,
>>
>>         -- 
>>         Mariano
>>         http://marianopeck.wordpress.com
>>
>>
>>         _______________________________________________
>>         Glass mailing list
>>         Glass at lists.gemtalksystems.com  <mailto:Glass at lists.gemtalksystems.com>
>>         http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
>         _______________________________________________
>         Glass mailing list
>         Glass at lists.gemtalksystems.com
>         <mailto:Glass at lists.gemtalksystems.com>
>         http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
>
>
>     -- 
>     Mariano
>     http://marianopeck.wordpress.com
>
>
>
>
> -- 
> Mariano
> http://marianopeck.wordpress.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150305/7114107e/attachment.html>


More information about the Glass mailing list