What kind of error objects can reach WinJS.Application.onerror RRS feed

  • Question

  • I have yet to see a complete list of objects that can be input for the WinJS.Application.onerror handler.

    So far I have seen objects with either:

    errorUrl, errorMessage,


    message or exception with or without stack

    To write a proper log output I'd like to know what kind of error objects to expect here (Given that no-one in the app just does a throw "string"). The docs are...minimal on this.

    Wednesday, December 10, 2014 4:22 PM

All replies

  • Hi,

    Not being very helpful here, just mentioning that I've got similar experiences as well, had to resort to doing quite a bit of poking to the object coming in to the handler function in order to log it as thoroughly as possible. But I can imagine that it might be difficult to come up with an exhaustive list of different input objects to this handler, especially since this handler grabs errors originating both from inside and outside the app model. 

    Wednesday, December 10, 2014 7:02 PM
  • Yes its taking time to tackle all the potential inputs. That's why I think the WinJS lib should do the heavy lifting and call this handler with a clearly specified, normalized error object. I'll open an issue over there. https://github.com/winjs/winjs/issues/807

    • Edited by pkursawe Wednesday, December 10, 2014 7:13 PM
    Wednesday, December 10, 2014 7:04 PM