0x800a139e - JavaScript runtime error: SyntaxError

后端 未结 3 1376
予麋鹿
予麋鹿 2020-12-06 02:17

I\'m new to Visual Studio Express 2012 for Windows 8.

I have been able to get a simple app to work just fine, but it would throw the same \"exceptions\".

So

3条回答
  •  佛祖请我去吃肉
    2020-12-06 02:46

    If the window object is available, define a window.onerror function to catch all uncaught exceptions:

     window.onerror = function (message, url, lineNo)
      {
      console.log('Error: ' + message + '\n' + 'Line Number: ' + lineNo);
    
      return true;
      }
    
    console.log(window);
    console.log(1=2);
    

    References

    • Better Error Handling With window.onerror

    • W3C Wiki: window.onerror

提交回复
热议问题