[HTML_AJAX-devel] RE : AJAX requests which fail silently ?

Joshua Eichorn josh at bluga.net
Fri Nov 30 15:39:30 MST 2007


Adding the custom error handler on remote stubs is a little ugly but it 
works.

You just have to add an onError function to the dispatchers options array

http://bluga.net/projects/HTML_AJAX/examples/error.php

For a quick example.

-josh
Alain BAUDHUIN wrote:
> Josh,
>
> Setting error handlers at call-level sound exactly like the solution I need.
> For those 'silently failing' calls, I'm only using Remote Stubs, as
> demonstrated in listing 9-4 in your book.
>
> Thanks in advance,
> Alain.
>
> _____________________
> Alain BAUDHUIN
> alain.baudhuin at swing.be
>
>
> -----Message d'origine-----
> De : Joshua Eichorn [mailto:josh at bluga.net] 
> Envoyé : vendredi 30 novembre 2007 22:07
> À : Alain BAUDHUIN
> Cc : html_ajax-devel at lists.bluga.net
> Objet : Re: [HTML_AJAX-devel] AJAX requests which fail silently ?
>
>
> Alain BAUDHUIN wrote:
>   
>> Hi,
>>  
>> I'm an enthusiast user of  HTML_AJAX for some time already. I'm mainly
>> exposing PHP classes using stubs, and I've provided my version of  
>> HTML_AJAX.onError= function(e) { (...) }which works just fine.
>>  
>> But now I'm facing the fact that some some of the exposed functions
>> should not perform any error reporting to the user in case of failure, 
>> (eg. server not available),. At some places, asynchronous calls to 
>> no-error-reporting-methods and standard-error-reporting-methods can be 
>> mixed, so I cannot possibly remove and restore the error handler.  Is 
>> there any way to inhibit error reporting on some of the exposed 
>> methods and not others ?
>>  
>> My only other idea would be to instanciate a second HTML_AJAX object,
>> with an empty onError function, but is this even possible since 
>> HTML_AJAX is a global ?
>>  
>> Thanks for any hint,
>>  
>> Alain.
>>  
>> _____________________
>> Alain BAUDHUIN
>> alain.baudhuin at swing.be <mailto:alain.baudhuin at swing.be>
>>  
>> ----------------------------------------------------------------------
>> --
>>
>> _______________________________________________
>> Html_ajax-devel mailing list
>> Html_ajax-devel at lists.bluga.net 
>> http://lists.bluga.net/mailman/listinfo/html_ajax-devel
>>   
>>     
> You should be able to set error handlers at the call level, with the 
> global handler used if thats not set.
>
> I can give you an example if I know what your doing (proxies, 
> HTML_AJAX.post, etc etc)
>
> -josh
>
>
>   



More information about the Html_ajax-devel mailing list