window.onerror doesn't work in mobile -- How should I deal with unhandled exceptions?

Viewed 1355

I'm working on a complex web application written in Sencha Touch and PhoneGap. The way Sencha Touch applications are written makes it hard to surround every potential failure point with a try/catch, especially with asynchronous AJAX request handlers.

It's also critically important to detect when an unhandled exception occurs because it looks and feels like a native app with PhoneGap (i.e. we can't expect them to refresh the page and try again like in a web app you view in a regular browser).

Can you suggest a recommendation for how to deal with this scenario?

2 Answers
Related