question

robin avatar image
robin asked

Kindle Fire HD7 Exception Handling for Html5 app debugging from within web

I am attempting to debug touch event logic using the web-app tester for a Html5 app. Using LogCat attached to KF HD7 via PC and deploying Html5 app at host server. When I use a try-catch statement, LogCat reports undefined for the exception. If I attempt to use e.message } catch( e ) { console.log( "Exception touchmove " + e.message.toString() ); 10-23 00:58:56.974: D/WebConsole-LOG(7371): Exception touchmove TypeError: Cannot call method 'toString' of undefined at http:// .js:438 10-23 00:58:56.974: D/DelegateQueue(7371): onConsoleMessage handled by com.amazon.atlas.extras.ConsoleMessageExtra () 10-23 00:58:56.974: E/WebConsole-ERROR(7371): Uncaught TypeError: Cannot call method 'toString' of undefined Logic would suggest to remove what might be causing the 'undefined' reference So, I tried } catch( e ) { console.log( "Exception touchmove " + e.message ); } catch( e ) { console.log( "Exception touchmove " + e ); 10-23 01:15:24.966: D/WebConsole-LOG(7371): Exception touchmove TypeError: Cannot call method 'toString' of undefined at http:// .js:441 10-23 01:15:24.966: D/DelegateQueue(7371): onConsoleMessage handled by com.amazon.atlas.extras.ConsoleMessageExtra () 10-23 01:15:24.974: E/WebConsole-ERROR(7371): Uncaught TypeError: Cannot call method 'toString' of undefined Using ref [1] and internal link to aws preferred doc source [2] and on a wild guess wondering if the literal 'err' is used as the catch parameter specific to the web-app tester, the argument of the catch parameter 'err' still produces the result: } catch( err ) { console.log( "Exception touchmove " + err ); 10-23 01:21:43.263: D/WebConsole-LOG(7371): Exception touchmove TypeError: Cannot call method 'toString' of undefined at http:// .js:440 10-23 01:21:43.263: D/DelegateQueue(7371): onConsoleMessage handled by com.amazon.atlas.extras.ConsoleMessageExtra () 10-23 01:21:43.263: E/WebConsole-ERROR(7371): Uncaught TypeError: Cannot call method 'toString' of undefined and, even attempted these } catch( error ) { console.log( "Exception touchmove " + error ); } catch( event ) { console.log( "Exception touchmove " + event ); } catch( evt ) { console.log( "Exception touchmove " + evt ); Searching aws for 'exception' produces no results [3] What is the Amazon web-app tester expecting to see as the parameter name for the javascript catch method, so that a valid error message will produce an understandable result? Is there a Silk browser debugger with single step capability that is similar to Firebug in Firefox? Thank you, Robin [1] http://docs.aws.amazon.com/silk/latest/developerguide/html5-apis.html#touch-events [2] http://www.w3schools.com/js/js_errors.asp [3] http://docs.aws.amazon.com/search/doc-search.html?searchPath=documentation-guide&searchQuery=exception&x=0&y=0&this_doc_product=Amazon+Silk&this_doc_guide=Developer+Guide&doc_locale=en_us#facet_doc_product=Amazon%20Silk&facet_doc_guide=Developer%20Guide
iap
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Sujoy@Amazon avatar image
Sujoy@Amazon answered
This issue more observed with current version of Web App Tester. Tested in both Android and Amazon web view. Thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.