[Seaside] error handling jquery ajax callbacks

Lukas Renggli renggli at gmail.com
Wed Dec 2 22:08:35 UTC 2009


Hi Johan,

I guess that you have WADebugErrorHandler or WAWalkbackErrorHandler
selected in your application configuration. If you change the error
handler to a generic WAErrorHandler (or a customized subclass thereof)
no debugger should show up and a response with an error code that can
be handled by the AJAX framework should be sent back.

Lukas

2009/12/2 Johan Brichau <johan.brichau at uclouvain.be>:
> Hi again,
>
> The send button was a little too sensitive. Here is what I still wanted to
> add.
>
> I currently have something like the code below but I wanted to know if there
> are more appropriate ways.
>
> (html jQuery ajax
>                callback: [ [1 / 0] on: Error do:[self requestContext
> respond: [:r | r internalError]]];
>                onError:  (... script to handle the error .... ) ))
>
> cheers
> Johan
>
> On 02 Dec 2009, at 21:29, Johan Brichau wrote:
>
>> Hi everyone,
>>
>> Server-side errors that occur during a (JQuery) ajax callback phase
>> automatically open a debugger window in the smalltalk image.
>> Is there a way to catch such errors and send back an error response to the
>> client?
>>
>> I think that I am basically looking to send an error response upon any
>> uncaught error in the callback and allow the onError handler of the ajax
>> request to popup an error window on the page. I cannot find anything in
>> Seaside that already does that, or where should I look for that?
>>
>> thanks
>> ----------------------------
>> Johan Brichau
>> johan.brichau at uclouvain.be
>>
>>
>>
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> ----------------------------
> Johan Brichau
> johan.brichau at uclouvain.be
>
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list