help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] gst from git master + iliad from svn trunk + hangin


From: Nicolas Petton
Subject: Re: [Help-smalltalk] gst from git master + iliad from svn trunk + hanging verboseMode response
Date: Fri, 26 Jun 2009 21:21:13 +0200

Le vendredi 26 juin 2009 à 20:25 +0200, Stefan Schmiedl a écrit :
> = a few hours of unbridled fun and printNl debugging :-)
> 
> <bla>
> So I'm running the most recent smalltalk and the most recent Iliad.
> And after I actually started doing something _with_ Iliad instead of
> _to_ it (what a willing victim for testing packaging Iliad is), I
> notice that sometimes my browser hangs waiting for a response...
> and always I manage to find a bug.
> 
> Switching the application to deploymentMode displays the expected 500
> message, so it must have something to do with the default verboseMode.
> 
> Veni, vidi, and there are messages in ErrorHandler>>produceVerboseResponse
> that cannot be found in the docs ... if this ain't an invitation to mess
> around, I don't know what is.

hehe ;)

> 
> Removing the "weird" stuff and sprinkling it with "self error inspect"
> and "self error backtraceOn: Transcript" produces quite interesting
> information ... on the console.
> </bla>
> 
> So gst has inspect with hardcoded Transcript references in it.
> And there are four definitions of inspect in the base classes to
> accomodate different types of objects.
> Well, my local gst now only has one inspect in Object but four
> inspectOn: aStream in the base classes ... and things still work.
> 
> The good new is that I now can produce some really helpful debugging
> info in ErrorHandler.st
> 
>      produceVerboseResponse [
>       <category: 'responding'>
>         |info|
>         info := WriteStream on: String new.
>         self error inspectOn: info.
>         self error context backtraceOn: info.
>         FileStream stderr nextPutAll: info contents.
>       self respond: [:response || page |
>               page := Page new.
>               page bodyElement h1: 'Internal Error';
>                   h2: self error description;
>                   h3: self error messageText;
>                     preformatted: info contents.
>               page build printHtmlOn: response]
>      ]
> 
> So now I not only see _where_ the problem occurred, I also see
> with _what data_ it occurred.... sweeet.


sweet indeed!

Paolo, could this patch be included in gst?

Thanks Stefan!

Nico
> 
> I'm attaching the two patches to this message for your consideration.
> 
> s.
> _______________________________________________ help-smalltalk mailing list 
> address@hidden http://lists.gnu.org/mailman/listinfo/help-smalltalk

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


reply via email to

[Prev in Thread] Current Thread [Next in Thread]