title: Elgently ignoring netscape.javascript.JSException during development
body: <p>Eclipse allows you debug applets using <em>sun.applet.AppletViewer</em>. It will actually start the applet, run it and emulate complete browser runtime. If you have javascript manipulation code in your applet this will cause JSException because the present context is not a real JS enabled engine.</p>
  
  <p>How would you solve this issue? I can see several possible paths:</p>
  
  <ol>
  <li>Wrap the exception in try {} catch () and ignore it - Not good practice.</li>
  <li>Pass and environment flag that would tell the code we are currently in debug mode, so that it won't try to execute JS code - OK but will need manual intervention from each developer.</li>
  <li>Identify current context is not a browser - How?</li>
  <li>Find another AppletViewer that can emulate a complete browser behavior, including JS - Is there ?</li>
  <li>More?</li>
  </ol>
  
  <p>Thank for your ideas.</p>