1. #1
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    8
    Vote Rating
    1
    mnadig is on a distinguished road

      0  

    Default Best way to add global ajax error handling?

    Best way to add global ajax error handling?


    Hi, reading over various posts and trying stuff out. However, I still haven't had success attaching a global error handler for my ajax calls.

    I read through
    http://www.sencha.com/forum/showthread.php?140693-Global-exception-handling-for-data-requests

    in Ext.application{ lauch block:
    Ext.util.Observable.observe(Ext.data.Connection);
    Ext.data.Connection.on('requestexception', function(dataconn, response, options){

    but getting script error

    I'm a bit lost. Any help greatly appreciated.

  2. #2
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    554
    Vote Rating
    24
    estesbubba will become famous soon enough estesbubba will become famous soon enough

      1  

    Default


    Try this

    Code:
            Ext.Ajax.on({
                requestcomplete: this.onRequestComplete,
                requestexception: this.onRequestException,
                beforerequest: this.onBeforeRequest,
                scope: this
            });

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    8
    Vote Rating
    1
    mnadig is on a distinguished road

      0  

    Default


    Quote Originally Posted by estesbubba View Post
    Try this
    ...
    muy bueno! Thanks a ton.

  4. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    25
    Vote Rating
    0
    grnadav is on a distinguished road

      0  

    Default


    would this catch Stores\Models network requests or just explicit Ext.Ajax.request s ?

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Location
    The Netherlands
    Posts
    75
    Vote Rating
    4
    SebasSP is on a distinguished road

      0  

    Default


    Only Ext.Ajax.request if I recall correctly

  6. #6
    Sencha User
    Join Date
    Jan 2012
    Posts
    25
    Vote Rating
    0
    grnadav is on a distinguished road

      0  

    Default


    bummer
    back to overriding Ext.data.Connection then...

  7. #7
    Sencha User
    Join Date
    Dec 2011
    Location
    Coimbatore
    Posts
    103
    Vote Rating
    -1
    venkatesh.R will become famous soon enough

      0  

    Default Global Exception

    Global Exception


    Hi,

    Where to add the Code Block in our apps
    Last edited by venkatesh.R; 4 Oct 2012 at 5:19 AM. Reason: removed code block

  8. #8
    Sencha User
    Join Date
    Mar 2012
    Location
    The Netherlands
    Posts
    75
    Vote Rating
    4
    SebasSP is on a distinguished road

      0  

    Default


    You can add it to the launch function of app.js.

  9. #9
    Sencha User
    Join Date
    Dec 2011
    Location
    Coimbatore
    Posts
    103
    Vote Rating
    -1
    venkatesh.R will become famous soon enough

      0  

    Default Global Exception

    Global Exception


    Hi,

    Thanks for your Info.

  10. #10
    Sencha User
    Join Date
    Dec 2011
    Location
    Coimbatore
    Posts
    103
    Vote Rating
    -1
    venkatesh.R will become famous soon enough

      0  

    Default Global ajax exception

    Global ajax exception


    Hi,

    I have added the above specified code block in launch() function of app.js

    But i got Uncaught TypeError: Cannot read property 'fn' of undefined .

    any suggestion on this issue.


    Thanks

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."