[Seaside] ZnZincStaticServerAdaptor and debug

François Stephany tulipe.moutarde at gmail.com
Wed Apr 16 23:43:37 UTC 2014


Oooh ok. You're right. This is seaside behaviour, nothing is related to
Zinc:

WAAdmin applicationExceptionHandlingDefaults at: #exceptionHandler "-->
WAHtmlErrorHandler".


I've registered WAWalkbackErrorHandler as the exception handler for my app
and it is now working. Here's the simplest setting to make it work:

CCRootComponent class>>initialize
    | app |
    super initialize.
    app := WAAdmin register: self asApplicationAt: 'my-super-app'.
    app exceptionHandler: WAWalkbackErrorHandler.

Is the WAHtmlErrorHandler the new exception handler in Seaside or did I
configure something wrong?

Thanks a lot Sven :)



On Wed, Apr 16, 2014 at 11:14 AM, Sven Van Caekenberghe <sven at stfx.eu>wrote:

> Hi François,
>
> I suspect you are confusing two aspects.
>
> Zinc can catch errors in its handler and report them in a user friendly
> page (standard behaviour) with the proper response code, or it can let the
> error through so that you end up in the debugger (debugMode: true) - see
> ZnSingleThreadedServer>>#handleRequestProtected:
>
> However, when using Seaside, all this is not necessary. Zinc is bit of
> overkill in this case, because Seaside wants to do more itself, including
> the error handling.
>
> In my image, this all works fine and as expected (as per the Seaside book
> / the standard instructions). You should have WAWalkbackErrorHandler as
> #exceptionHandler.
>
> Sven
>
> BTW, at first sight, your code looks OK to me.
>
> On 16 Apr 2014, at 10:55, François Stephany <tulipe.moutarde at gmail.com>
> wrote:
>
> > Actually it works fine but I still doesn't have a debugger popping up in
> case of error. I still get a 500 page with the error message. This is how I
> start it:
> >
> >     CCZincStaticServerAdaptor startOn: 8080.
> >     CCZincStaticServerAdaptor default server debugMode: true.
> >
> > Any thing that I'm missing?
> >
> >
> > On Tue, Apr 15, 2014 at 6:06 PM, François Stephany <
> tulipe.moutarde at gmail.com> wrote:
> > I quickly put this together:
> > It will serve stuff placed in the assets directory (which must sit next
> to the image). Nothing really fancy but does the job:
> >
> > ZnSeasideStaticServerAdaptorDelegate subclass: #CCStaticServerDelegate
> >     instanceVariableNames: ''
> >     classVariableNames: ''
> >     category: 'Cocotte-Web'
> >
> > CCStaticServerDelegate>>handleRequest: znRequest
> >     znRequest url firstPathSegment = 'assets'
> >         ifTrue: [
> >             znRequest url removeFirstPathSegment. "eats the /assets/"
> >             ^self staticDelegate handleRequest: znRequest ]
> >         ifFalse: [  ^self adaptor process: znRequest ]
> >
> > CCStaticServerDelegate>>initializeStaticDelegate
> >     | assetDirectory |
> >     assetDirectory := (FileLocator imageDirectory / 'assets').
> >     ^ ZnStaticFileServerDelegate new
> >         directory: (ZnFileSystemUtils directory: assetDirectory)  ;
> >         yourself
> >
> > And the Adaptor:
> >
> > ZnZincStaticServerAdaptor subclass: #CCZincStaticServerAdaptor
> >     instanceVariableNames: ''
> >     classVariableNames: ''
> >     category: 'Cocotte-Web'
> >
> > ZnZincStaticServerAdaptor>>defaultDelegate
> >     ^ CCStaticServerDelegate with: self
> >
> >
> > On Sun, Apr 13, 2014 at 3:16 PM, Johan Brichau <johan at inceptive.be>
> wrote:
> > To serve static files from a directory during development, there still
> is the Seaside-Filesystem package.
> > -> Load the 'Filesystem' group from ConfigurationOfSeaside3
> >
> > But I also do intend to replace it with serving static files from Zinc
> directly though. But, in the meantime, it's doing the job.
> >
> > Johan
> >
> > On 10 Apr 2014, at 08:39, François Stephany <tulipe.moutarde at gmail.com>
> wrote:
> >
> > > Ok. I've got quite a bit of external files, I'll roll my own ;)
> > >
> > > thanks !
> > > ​
> > > _______________________________________________
> > > seaside mailing list
> > > seaside at lists.squeakfoundation.org
> > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> >
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20140417/b895a096/attachment.htm


More information about the seaside mailing list