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 [hidden email] _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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 > [hidden email] > > > > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside ---------------------------- Johan Brichau [hidden email] _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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 <[hidden email]>: > 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 >> [hidden email] >> >> >> >> >> _______________________________________________ >> seaside mailing list >> [hidden email] >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > ---------------------------- > Johan Brichau > [hidden email] > > > > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
of course!
I got confused when trying different error handlers and never seemed to get an error response back. However, it does work so I did something wrong before. thanks Lukas! On 02 Dec 2009, at 23:08, Lukas Renggli wrote: > 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 <[hidden email]>: >> 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 >>> [hidden email] >>> >>> >>> >>> >>> _______________________________________________ >>> seaside mailing list >>> [hidden email] >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> ---------------------------- >> Johan Brichau >> [hidden email] >> >> >> >> >> _______________________________________________ >> seaside mailing list >> [hidden email] >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > > > -- > Lukas Renggli > http://www.lukas-renggli.ch > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside ---------------------------- Johan Brichau [hidden email] _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |