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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

GLASS mailing list
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?


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

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

GLASS mailing list
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, 

--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

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

GLASS mailing list
Thanks Dale, that was exactly what I was looking for. 

Best, 

On Tue, Mar 3, 2015 at 6:34 PM, Dale Henrichs via Glass <[hidden email]> 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, 

--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

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

GLASS mailing list
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 <[hidden email]> 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 <[hidden email]> 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, 

--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--



--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

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

GLASS mailing list
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 <[hidden email]> 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 <[hidden email]> 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, 

--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--



--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass