1. #1
    Sencha User harley.333's Avatar
    Join Date
    Mar 2007
    Posts
    286
    Vote Rating
    4
    harley.333 is on a distinguished road

      0  

    Default Centralized JavaScript Exception Handling

    Centralized JavaScript Exception Handling


    Hey guys,

    Recently, I've started investigating JavaScript's exception handling techniques. And apparently, JavaScript doesn't have a great model. JS's try{...}catch(error){...} functionality is pretty good. But where is the fallback technique for code outside of try...catch?

    IE and Firefox both support window.onerror(msg, url, line). But what about Safari and Opera?

    When you use try...catch, each browser returns a slightly different Error object.

    Has anyone else tried to cope with this issue?

    Personally, I'd love to see Ext expose a technique for catching any and all exceptions throw within Ext's code base. I know that's a tall order (since Ext's code base is already so large), but I think it could be pretty simple.

    Perhaps a new 'global' event: Ext.onerror(Object this, Ext.Error err)

    Thoughts?

  2. #2
    Sencha User loeppky's Avatar
    Join Date
    May 2007
    Location
    Seattle, WA
    Posts
    230
    Vote Rating
    0
    loeppky is on a distinguished road

      0  

    Default


    harley.333: I just learned yesterday about window.onerror at The Ajax Experience. As you point out, the only downside is not supporting Safari and Opera. So, I agree that modifying Ext to provide a global error handler would be great.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    1
    Vote Rating
    0
    MemtechLodhi is on a distinguished road

      0  

    Default


    Hey Guys,
    Please check out this link http://mindstick.com/Articles/ba0d0b...0Java%20Script for more details on exception handling in javascript.

    Thanks !!!!!

  4. #4
    Sencha User debianw's Avatar
    Join Date
    Mar 2012
    Location
    Costa Rica
    Posts
    48
    Vote Rating
    1
    debianw is on a distinguished road

      0  

    Default


    Yes, I agree, I would like to see in Sencha a way to centralized exceptions and then later We can write a log file with all of this exceptions and send it to a server.

    This would be very helpful in Sencha Touch when We use it in native apps. The mobile device can report when something crash.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar