[Glass] GsDevKit and tode debugger

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Tue Sep 25 11:05:37 PDT 2018



On 09/18/2018 09:51 PM, Jon Paynter wrote:
> Thanks for the reply.
> I tried following the instructions in the 
> server-support-for-zinc-rest, but the example would not install.
>
> So I added your change into my rest handler (with minor edits) like so:
> SersHandler>>handleFiltered: aValue
>   [ super handleFiltered: aValue ]
>     on: Error , Halt , Warning
>     do: [ :ex |
>       GRPlatform current
>         doTransaction: [
>           (ex isKindOf: Warning)
>             ifTrue: [
>               "record warning message in object log"
>               (ObjectLogEntry warn: ex description) addToLog ]
>             ifFalse: [
>               "record continuation in object log"
>               DebuggerLogEntry createContinuationLabeled: ex 
> description ]
>        ]
> ]
> I used #handleFiltered because the comments in #handle say "do not 
> override this method"
>
> which works - but the client is not notified anything went wrong.  I 
> get a blank response, instead of a 500 error.
> so I  added
>
> SersHandler>>handleFiltered: aValue
>   [ super handleFiltered: aValue ]
>     on: Error , Halt , Warning
>     do: [ :ex |
>       GRPlatform current
>         doTransaction: [
>           (ex isKindOf: Warning)
>             ifTrue: [
>               "record warning message in object log"
>               (ObjectLogEntry warn: ex description) addToLog ]
>             ifFalse: [
>               "record continuation in object log"
>               DebuggerLogEntry createContinuationLabeled: ex 
> description ]
> *       ].*
> *       ex signal*
> ]
>
> Which correctly gives me a 500 error on the client, and creates an 
> entry in the object log.  but the zinc log reports "Exception has 
> already been signaled"  I want to re-raise the error
Not quite sure what you are trying to do here, but perhaps you want to 
use `ex pass`? `pass` will cause additional handlers on the stack to be 
triggered, which seems to be what you want?
>
>
> .... and on a different note with glass & git repositories.
> I assume the folder in $GS_HOME/shared/repos/<project> is a normal git 
> repo and I can just push the contents to my github?
Yes ... tODE arranges to clone projects into $GS_HOME/shared/repos/ 
where the projects can be shared by all of your stones ... it is also 
possible to clone the git repositories in a directory that is "private" 
to your stone: $GS_HOME/server/stones/<stone-name>/git...
> where do i find instructions on how to do 'class extensions' ?
That's a very good question! I googled around and could not find a very 
good explanation anywhere ... except for this[1] ... The convention for 
Monticello packages is to create a method protocol/category with a 
leading $* followed by the name of the package (case insensitive), 
followed by a $- and additional protocol names ...

All methods in this category will be included in the named package ...

Hope this helps ...

Dale

[1] http://pharo.gforge.inria.fr/PBE1/PBE1ch7.html#x32-108011r17

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20180925/068de9fa/attachment.html>


More information about the Glass mailing list