locked
How does JavaScript intelllisense handle exceptions? RRS feed

  • Question

  • I have a strange behavior:

                    try{
                        intellisense.logMessage("BEGIN TRY");
                        //var test = 1 / 0;
                        throw new WinJS.ErrorFromName("ArgumentOutOfRange", "invalid...");
                        intellisense.logMessage("END TRY");
                    } catch (ex) {
                        intellisense.logMessage("CATCH");
                    }

    With this, I have the (unexpected) result of :


    06:05:28.9700: BEGIN TRY

    06:05:28.9700: END TRY

    So, are all exceptions simply ignored? Does there is a maximum of exceptions? Or is there any other limitations, like the file numbers? I'm currently investigating on why IntelliSense is unstable with my custom extensions, and I would help to have more détails.

    Thanks.


    • Edited by Instriker Monday, July 30, 2012 10:13 PM
    Monday, July 30, 2012 10:10 PM

Answers

  • In general all exceptions are ignored.  Code in a catch block will not affect IntelliSense (except if you are typing in that catch block).


    This posting is provided "as is" with no warranties, and confers no rights.

    • Marked as answer by Min ZhuMember Tuesday, July 31, 2012 6:53 AM
    • Unmarked as answer by Min ZhuMember Tuesday, July 31, 2012 6:53 AM
    • Proposed as answer by Min ZhuMember Tuesday, July 31, 2012 6:53 AM
    • Marked as answer by Instriker Tuesday, July 31, 2012 1:57 PM
    Monday, July 30, 2012 11:39 PM