locked
Error handling

    Question

  • I tried using window.onerror and window.addEventListener("error", ...), in order to handle some JavaScript errors, but it didn't seem to work in my JavaScript Metro style app :/

    I can create a wwa-error.html page, to handle navigation errors. But is there a mechanism to catch other exceptions globally?

    Thanks.

    Tuesday, February 28, 2012 5:32 AM

Answers

  • I tried this out just now on the Consumer Preview release and my error handler appears to be called for the common cases I can think of (user thrown exceptions, reference errors, syntax errors.) Do you have specific code that is not causing window.onerror to be called?

    Cheers,

    -Jeff

    Wednesday, February 29, 2012 6:31 PM

All replies