stop javascript executing when catch error
<p>I need a function that stop execute javascript when catch error. For example as follow:</p>

<pre><code>function AA()
{
  try{
    executeScript();
  }catch(e){
    //stop execute javascript
  }
}

function executeScript()
{
   throw 'error';
}
function BB()
{
  //some script
}
AA();
BB(); //don't execute when error happening
</code></pre>

<p>Has anybody know how to do it? Thanks for help.</p>
