Catching all JavaScript errors/exceptions on Wii/Opera 9

天大地大妈咪最大 提交于 2020-02-01 03:14:06

问题


I am updating a site that I've built for the Nintendo Wii, and am looking for a good way to debug the application. Wii's browser (a version of Opera 9.3) does not have any sort of JavaScript console. I was going to use one of the various remote debug console solutions (such as jsconsole.com), but none of them seem to work. I suspect the reason for this is some sort of unsupported functionality, but I cannot figure out what that is without a console or some sort of error output.

Things I've tried:

  1. window.onerror (Not supported until Opera 11.6)
  2. Overriding the Error.prototype.toString method (works on desktops, not on Wii)
  3. Code that appears to wrap script in try/catch blocks (Exceptions aren't thrown for reference errors and what not. try/catch works, but only for exceptions I throw.)
  4. <body onerror="alert('ERROR!!!')" />
  5. PhoneGap's Remote Debugger / Weinre

Are there any other suggestions for catching errors and unhandled exceptions for an entire page?


回答1:


this link was suggestting lookimng into firebug lite. I don't know how it would fare on the wii browser as I don't own the device.

It's a pity that the engine is too old for supporting draagonfly.




回答2:


You could always program in the debugging code yourself, for instance:

try{
    yourFunction();
}catch(e){
    alert('yourFunction failed!');
}


来源:https://stackoverflow.com/questions/12664434/catching-all-javascript-errors-exceptions-on-wii-opera-9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!